Whamcloud - gitweb
LU-7268 scrub: NOT assign LMA for EA inode
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_oi.c
index c377368..6f15760 100644 (file)
@@ -658,6 +658,13 @@ int osd_oi_insert(struct osd_thread_info *info, struct osd_device *osd,
                        return rc;
                }
 
                        return rc;
                }
 
+               /* The EA inode should NOT be in OI, old OI scrub may added
+                * such OI mapping by wrong, replace it. */
+               if (unlikely(osd_is_ea_inode(inode))) {
+                       iput(inode);
+                       goto update;
+               }
+
                rc = osd_get_lma(info, inode, &info->oti_obj_dentry, lma);
                iput(inode);
                if (rc == -ENODATA)
                rc = osd_get_lma(info, inode, &info->oti_obj_dentry, lma);
                iput(inode);
                if (rc == -ENODATA)