From e3c85d27cb4b3fc59181ed52b5090e812a1ab0ae Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Sat, 29 Sep 2012 22:47:07 +0400 Subject: [PATCH] LU-1303 osd: zfs-osd should initialize local objects on MDS zfs-osd to call llo_local_objects_setup() to initialize local MDS objects (like ldiskfs-osd does). zfs-osd should not try to control naming for objects maintained by MDT/MDT (initialized with llo_local_objects_setup()). disable LASSERT() in MGS: with zfs backend it's not correct. MDT does not need to access configs, so disable setup of llogs in MDT. Signed-off-by: Alex Zhuravlev Change-Id: I464a78372daf8baf1900f2dbb33e74ba9ffb33b1 Reviewed-on: http://review.whamcloud.com/4134 Reviewed-by: Mike Pershin Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/mdt/mdt_handler.c | 4 ++++ lustre/obdclass/obd_mount.c | 1 - lustre/osd-zfs/osd_handler.c | 9 +++++++++ lustre/osd-zfs/osd_oi.c | 10 +++++----- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index fd174aa..2afda58 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -4855,6 +4855,8 @@ static int mdt_obd_llog_setup(struct obd_device *obd, { int rc; + return 0; + LASSERT(obd->obd_fsops == NULL); obd->obd_fsops = fsfilt_get_ops(lsi->lsi_fstype); @@ -4886,6 +4888,8 @@ static void mdt_obd_llog_cleanup(struct obd_device *obd) { struct llog_ctxt *ctxt; + return; + ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); if (ctxt) llog_cleanup(NULL, ctxt); diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 3ccd934..2ca91e9 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -389,7 +389,6 @@ static int server_start_mgs(struct super_block *sb) struct lustre_mount_info *lmi; int rc = 0; ENTRY; - LASSERT(mnt); /* It is impossible to have more than 1 MGS per node, since MGC wouldn't know which to connect to */ diff --git a/lustre/osd-zfs/osd_handler.c b/lustre/osd-zfs/osd_handler.c index c7cb402..bba18f7 100644 --- a/lustre/osd-zfs/osd_handler.c +++ b/lustre/osd-zfs/osd_handler.c @@ -789,6 +789,15 @@ static int osd_prepare(const struct lu_env *env, struct lu_device *pdev, int rc = 0; ENTRY; + if (dev->ld_site && lu_device_is_md(dev->ld_site->ls_top_dev)) { + /* MDT/MDD still use old infrastructure to create + * special files */ + rc = llo_local_objects_setup(env, lu2md_dev(pdev), + lu2dt_dev(dev)); + if (rc) + RETURN(rc); + } + /* initialize quota slave instance */ osd->od_quota_slave = qsd_init(env, osd->od_svname, &osd->od_dt_dev, osd->od_proc_entry); diff --git a/lustre/osd-zfs/osd_oi.c b/lustre/osd-zfs/osd_oi.c index d00b1fa..0df1568 100644 --- a/lustre/osd-zfs/osd_oi.c +++ b/lustre/osd-zfs/osd_oi.c @@ -92,11 +92,11 @@ static const struct named_oid oids[] = { { OFD_LAST_RECV_OID, LAST_RCVD }, { OFD_LAST_GROUP_OID, "LAST_GROUP" }, { LLOG_CATALOGS_OID, "CATALOGS" }, - { MGS_CONFIGS_OID, MOUNT_CONFIGS_DIR }, - { FID_SEQ_SRV_OID, "seq_srv" }, - { FID_SEQ_CTL_OID, "seq_ctl" }, - { MDD_CAPA_KEYS_OID, CAPA_KEYS }, - { FLD_INDEX_OID, "fld" }, + { MGS_CONFIGS_OID, NULL /*MOUNT_CONFIGS_DIR*/ }, + { FID_SEQ_SRV_OID, NULL /* "seq_srv" */}, + { FID_SEQ_CTL_OID, NULL /*"seq_ctl"*/ }, + { MDD_CAPA_KEYS_OID, NULL /*CAPA_KEYS*/ }, + { FLD_INDEX_OID, NULL /* "fld" */ }, { MDD_LOV_OBJ_OID, LOV_OBJID }, { MDT_LAST_RECV_OID, LAST_RCVD }, { OFD_HEALTH_CHECK_OID, HEALTH_CHECK }, -- 1.8.3.1