Under DNE case, for the object on remote MDT, there will be an agent
inode on the local MDT where the name entry resides. We do NOT build
OI mapping for such agent inode, so OI scrub should skip it.The same
for the "/REMOTE_PARENT_DIR".
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I164473bcba80043800d491639c027e7c13f30bd9
Reviewed-on: http://review.whamcloud.com/6332
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
if (!mdd_object_exists(parent))
goto shrink;
if (!mdd_object_exists(parent))
goto shrink;
- /* XXX: need more processing for remote object in the future. */
+ /* XXX: Currently, skip remote object, the consistency for
+ * remote object will be processed in LFSCK phase III. */
if (mdd_object_remote(parent)) {
mdd_object_put(env, parent);
ldata.ld_lee = LINKEA_NEXT_ENTRY(ldata);
if (mdd_object_remote(parent)) {
mdd_object_put(env, parent);
ldata.ld_lee = LINKEA_NEXT_ENTRY(ldata);
- /* XXX: need more processing for remote object in the future. */
+ /* XXX: Currently, skip remote object, the consistency for
+ * remote object will be processed in LFSCK phase III. */
if (!mdd_object_exists(target) || mdd_object_remote(target))
goto obj_put;
if (!mdd_object_exists(target) || mdd_object_remote(target))
goto obj_put;
else if (IS_ERR(obj))
RETURN(PTR_ERR(obj));
else if (IS_ERR(obj))
RETURN(PTR_ERR(obj));
- /* XXX: need more processing for remote object in the future. */
+ /* XXX: Currently, skip remote object, the consistency for
+ * remote object will be processed in LFSCK phase III. */
if (!mdd_object_exists(obj) || mdd_object_remote(obj) ||
unlikely(!S_ISDIR(mdd_object_type(obj))))
GOTO(out, rc = 0);
if (!mdd_object_exists(obj) || mdd_object_remote(obj) ||
unlikely(!S_ISDIR(mdd_object_type(obj))))
GOTO(out, rc = 0);
- /* XXX: need more processing for remote object in the future. */
+ /* XXX: Currently, skip remote object, the consistency for
+ * remote object will be processed in LFSCK phase III. */
if (mdd_object_exists(child) && !mdd_object_remote(child))
rc = mdd_lfsck_exec_dir(env, lfsck, child, ent);
mdd_object_put(env, child);
if (mdd_object_exists(child) && !mdd_object_remote(child))
rc = mdd_lfsck_exec_dir(env, lfsck, child, ent);
mdd_object_put(env, child);
- /* XXX: In fact, low layer otable-based iteration should not
- * return agent object. But before LU-2646 resolved, we
- * need more processing for agent object. */
+ /* XXX: Currently, skip remote object, the consistency for
+ * remote object will be processed in LFSCK phase III. */
if (mdd_object_exists(target) && !mdd_object_remote(target))
rc = mdd_lfsck_exec_oit(env, lfsck, target);
mdd_object_put(env, target);
if (mdd_object_exists(target) && !mdd_object_remote(target))
rc = mdd_lfsck_exec_oit(env, lfsck, target);
mdd_object_put(env, target);
if (IS_ERR(d))
GOTO(cleanup, rc = PTR_ERR(d));
if (IS_ERR(d))
GOTO(cleanup, rc = PTR_ERR(d));
+ ldiskfs_set_inode_state(d->d_inode, LDISKFS_STATE_LUSTRE_NO_OI);
omm->omm_remote_parent = d;
/* Set LMA for remote parent inode */
omm->omm_remote_parent = d;
/* Set LMA for remote parent inode */
+ /* skip the REMOTE_PARENT_DIR. */
+ if (inode == dev->od_mdt_map->omm_remote_parent->d_inode)
+ GOTO(out_inode, rc = 0);
+
rc = osd_get_lma(info, inode, &info->oti_obj_dentry, lma);
if (rc == 0) {
if (fid_is_sane(fid)) {
rc = osd_get_lma(info, inode, &info->oti_obj_dentry, lma);
if (rc == 0) {
if (fid_is_sane(fid)) {
rc = osd_get_lma(info, inode, &info->oti_obj_dentry, lma);
if (rc == 0) {
if (fid_is_llog(&lma->lma_self_fid) ||
rc = osd_get_lma(info, inode, &info->oti_obj_dentry, lma);
if (rc == 0) {
if (fid_is_llog(&lma->lma_self_fid) ||
- (!scrub && fid_is_internal(&lma->lma_self_fid)))
+ (!scrub && fid_is_internal(&lma->lma_self_fid)) ||
+ (scrub && (lma->lma_incompat & LMAI_AGENT)))
rc = SCRUB_NEXT_CONTINUE;
else
*fid = lma->lma_self_fid;
rc = SCRUB_NEXT_CONTINUE;
else
*fid = lma->lma_self_fid;