In osd_dir_it_rec(), if dirent is successfully got, and the FID in
dirent is sane, it returns right away, however if
LUDA_VERIFY|LUDA_VERIFY_DRYRUN is set, the FID in dirent should be
compared with the FID in LMA, and replaced with the latter one if
they are differet.
Lustre-change: https://review.whamcloud.com/41274
Lustre-commit:
f5136e81957e4b67ae6ed7764d378b817fac5ee2
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I35e2a4d4606044cd37cc5847cffc577740918988
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/43267
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lde->lde_attrs |= LUDA_UNKNOWN;
}
- GOTO(pack_attr, rc = 0);
+ if (!(attr & (LUDA_VERIFY | LUDA_VERIFY_DRYRUN)))
+ GOTO(pack_attr, rc = 0);
}
if (OBD_FAIL_CHECK(OBD_FAIL_FID_LOOKUP))
GOTO(pack_attr, rc = 0);
}
+ if (za->za_num_integers >= 3 && fid_is_sane(&zde->lzd_fid) &&
+ lu_fid_eq(&zde->lzd_fid, fid))
+ GOTO(pack_attr, rc = 0);
+
if (!(attr & LUDA_VERIFY)) {
fid_cpu_to_le(&lde->lde_fid, fid);
lde->lde_attrs = LUDA_FID;