X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdd%2Fmdd_lfsck.c;h=bca6ce194df663b568d77b288925075c353dc78b;hp=02ea96836f282e1a4bb749f86d6734bd9f4361b9;hb=c3b6fe769f7a32ba1c0f42b8e9604abecaa43da4;hpb=7e915f5d7177b22bd3cc800137fb505781a2c037 diff --git a/lustre/mdd/mdd_lfsck.c b/lustre/mdd/mdd_lfsck.c index 02ea968..bca6ce1 100644 --- a/lustre/mdd/mdd_lfsck.c +++ b/lustre/mdd/mdd_lfsck.c @@ -2118,12 +2118,17 @@ static int object_is_client_visible(const struct lu_env *env, else if (IS_ERR(obj)) return PTR_ERR(obj); - /* XXX: need more processing for remote object in the future. */ - if (!mdd_object_exists(obj) || mdd_object_remote(obj)) { + if (!mdd_object_exists(obj)) { mdd_object_put(env, obj); return 0; } + /* Currently, only client visible directory can be remote. */ + if (mdd_object_remote(obj)) { + mdd_object_put(env, obj); + return 1; + } + depth++; } return 0; @@ -2213,12 +2218,19 @@ static int mdd_lfsck_prep(struct lu_env *env, struct md_lfsck *lfsck) /* Init otable-based iterator. */ if (pos == NULL) { rc = iops->load(env, lfsck->ml_di_oit, 0); - GOTO(out, rc = (rc >= 0 ? 0 : rc)); + if (rc > 0) { + lfsck->ml_oit_over = 1; + rc = 0; + } + + GOTO(out, rc); } rc = iops->load(env, lfsck->ml_di_oit, pos->lp_oit_cookie); if (rc < 0) GOTO(out, rc); + else if (rc > 0) + lfsck->ml_oit_over = 1; if (fid_is_zero(&pos->lp_dir_parent)) GOTO(out, rc = 0);