summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e5c8f66)
because of stale OI, otherwise LFSCK has no chance to
fix direntry. lookup should initiate OI scrubber and
give it a hint about FID->dnode mapping.
This should fix sanity-lfsck/23b failing with ZFS often.
Test-Parameters: fstype=zfs testlist=sanity-lfsck env=ONLY=23b,ONLY_REPEAT=200
Change-Id: Iea826de9995e34939eff2d67a831deb6b192bd4d
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/37322
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
out:
if (!rc && !osd_remote_fid(env, osd, fid)) {
out:
if (!rc && !osd_remote_fid(env, osd, fid)) {
- rc = osd_consistency_check(env, osd, obj, fid, oid,
+ /*
+ * this should ask the scrubber to check OI given
+ * the mapping we just found in the dir entry.
+ * but result of that check should not affect
+ * result of the lookup in the directory.
+ * otherwise such a direntry becomes hidden
+ * from the layers above, including LFSCK which
+ * is supposed to fix dangling entries.
+ */
+ osd_consistency_check(env, osd, obj, fid, oid,
S_ISDIR(DTTOIF(oti->oti_zde.lzd_reg.zde_type)));
S_ISDIR(DTTOIF(oti->oti_zde.lzd_reg.zde_type)));
- /* Only -ENOENT error will affect the lookup result. */
- if (rc != -ENOENT)
- rc = 0;
}
return rc == 0 ? 1 : (rc == -ENOENT ? -ENODATA : rc);
}
return rc == 0 ? 1 : (rc == -ENOENT ? -ENODATA : rc);