The commit:
4d408c9aed9adaf1f4e2ea87851728a1cf662594
introduced a issue in '..' no fid-in-dirent case.
Since it just deal with remote case. So the '..'
would disappeared if it is a local object and
no fid-in-dirent.
Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ib2b0be1c43986472cb674dd86d32f023a4b26a34
Reviewed-on: http://review.whamcloud.com/13987
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
} else {
attr &= ~LU_DIRENT_ATTRS_MASK;
if (!fid_is_sane(fid)) {
} else {
attr &= ~LU_DIRENT_ATTRS_MASK;
if (!fid_is_sane(fid)) {
+ bool is_dotdot = false;
if (it->oie_dirent->oied_namelen == 2 &&
it->oie_dirent->oied_name[0] == '.' &&
if (it->oie_dirent->oied_namelen == 2 &&
it->oie_dirent->oied_name[0] == '.' &&
- it->oie_dirent->oied_name[1] == '.') {
- /* If the parent is on remote MDT, and there
- * is no FID-in-dirent, then we have to get
- * the parent FID from the linkEA. */
- if (ino == osd_remote_parent_ino(dev))
- rc = osd_get_pfid_from_linkea(env, obj,
- fid);
+ it->oie_dirent->oied_name[1] == '.')
+ is_dotdot = true;
+ /* If the parent is on remote MDT, and there
+ * is no FID-in-dirent, then we have to get
+ * the parent FID from the linkEA. */
+ if (ino == osd_remote_parent_ino(dev) && is_dotdot) {
+ rc = osd_get_pfid_from_linkea(env, obj, fid);
- if (OBD_FAIL_CHECK(OBD_FAIL_FID_LOOKUP))
+ if (is_dotdot == false &&
+ OBD_FAIL_CHECK(OBD_FAIL_FID_LOOKUP))
RETURN(-ENOENT);
rc = osd_ea_fid_get(env, obj, ino, fid, id);
RETURN(-ENOENT);
rc = osd_ea_fid_get(env, obj, ino, fid, id);