X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fofd%2Fofd_dev.c;h=7e596a4bc678ed7c94f568f10457edb2683670d6;hp=05365a919a26761a1a753eb34735133eb2dff989;hb=be7efb4ce06996444c08914305a73833a7123eeb;hpb=279e4dd34e18de0f8ecda61b65d6e0f56f7c9fc8 diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index 05365a9..7e596a4 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -2802,6 +2802,7 @@ static int ofd_init0(const struct lu_env *env, struct ofd_device *m, struct ofd_thread_info *info = NULL; struct obd_device *obd; struct obd_statfs *osfs; + struct lu_fid fid; int rc; ENTRY; @@ -2933,14 +2934,31 @@ static int ofd_init0(const struct lu_env *env, struct ofd_device *m, if (rc) GOTO(err_fini_lut, rc); - rc = ofd_start_inconsistency_verification_thread(m); + fid.f_seq = FID_SEQ_LOCAL_NAME; + fid.f_oid = 1; + fid.f_ver = 0; + rc = local_oid_storage_init(env, m->ofd_osd, &fid, + &m->ofd_los); if (rc != 0) GOTO(err_fini_fs, rc); + rc = nodemap_fs_init(env, m->ofd_osd, obd, m->ofd_los); + if (rc != 0) + GOTO(err_fini_los, rc); + + rc = ofd_start_inconsistency_verification_thread(m); + if (rc != 0) + GOTO(err_fini_nm, rc); + tgt_adapt_sptlrpc_conf(&m->ofd_lut, 1); RETURN(0); +err_fini_nm: + nodemap_fs_fini(env, obd); +err_fini_los: + local_oid_storage_fini(env, m->ofd_los); + m->ofd_los = NULL; err_fini_fs: ofd_fs_cleanup(env, m); err_fini_lut: @@ -2985,6 +3003,12 @@ static void ofd_fini(const struct lu_env *env, struct ofd_device *m) ofd_stop_inconsistency_verification_thread(m); lfsck_degister(env, m->ofd_osd); ofd_fs_cleanup(env, m); + nodemap_fs_fini(env, obd); + + if (m->ofd_los != NULL) { + local_oid_storage_fini(env, m->ofd_los); + m->ofd_los = NULL; + } if (m->ofd_namespace != NULL) { ldlm_namespace_free_post(m->ofd_namespace);