}
*fid = lma->lma_self_fid;
+ if (unlikely(fid_is_last_id(fid))) {
+ if (scrub) {
+ if (lma->lma_compat & LMAC_FID_ON_OST)
+ rc = SCRUB_NEXT_OSTOBJ;
+ else
+ rc = osd_scrub_check_local_fldb(info,
+ dev, fid);
+ }
+
+ /* XXX: For up layer iteration, LAST_ID is a visible
+ * object to be checked and repaired, so return
+ * it directly.
+ *
+ * In fact, the OSD layer otable-based iteration
+ * should not care about the FID type, it is the
+ * up layer user's duty (LFSCK) to handle that.
+ * It will be fixed in other patch in future. */
+ return rc;
+ }
+
if (fid_is_internal(&lma->lma_self_fid)) {
if (!scrub)
rc = SCRUB_NEXT_CONTINUE;
if (lma->lma_compat & LMAC_FID_ON_OST)
return SCRUB_NEXT_OSTOBJ;
- if (fid_is_idif(fid) || fid_is_last_id(fid))
+ if (fid_is_idif(fid))
return SCRUB_NEXT_OSTOBJ_OLD;
if (lma->lma_incompat & LMAI_AGENT)