Whamcloud - gitweb
LU-2868 lfsck: finish otable iteration if no more objects
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_scrub.c
index 858aa07..3736410 100644 (file)
@@ -1873,6 +1873,13 @@ static int osd_otable_it_rec(const struct lu_env *env, const struct dt_it *di,
        struct osd_otable_cache *ooc = &it->ooi_cache;
 
        *(struct lu_fid *)rec = ooc->ooc_cache[ooc->ooc_consumer_idx].oic_fid;
+
+       /* Filter out Invald FID already. */
+       LASSERTF(fid_is_sane((struct lu_fid *)rec),
+                "Invalid FID "DFID", p_idx = %d, c_idx = %d\n",
+                PFID((struct lu_fid *)rec),
+                ooc->ooc_producer_idx, ooc->ooc_consumer_idx);
+
        return 0;
 }