Whamcloud - gitweb
LU-957 scrub: Ancillary work for LFSCK/OI scrub
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_oi.c
index 3e3279a..cfd308b 100644 (file)
@@ -456,11 +456,8 @@ int osd_oi_lookup(struct osd_thread_info *info, struct osd_device *osd,
                 id->oii_ino = inode->i_ino;
                 id->oii_gen = inode->i_generation;
         } else {
-                if (unlikely(fid_seq(fid) == FID_SEQ_LOCAL_FILE)) {
-                        rc = osd_compat_spec_lookup(info, osd, fid, id);
-                        if (rc == 0 || rc != -ERESTART)
-                                goto out;
-                }
+               if (unlikely(fid_seq(fid) == FID_SEQ_LOCAL_FILE))
+                       return osd_compat_spec_lookup(info, osd, fid, id);
 
                 fid_cpu_to_be(oi_fid, fid);
                 key = (struct dt_key *)oi_fid;
@@ -476,8 +473,6 @@ int osd_oi_lookup(struct osd_thread_info *info, struct osd_device *osd,
                         rc = -ENOENT;
                 }
         }
-
-out:
         return rc;
 }
 
@@ -535,15 +530,15 @@ int osd_oi_insert(struct osd_thread_info *info, struct osd_device *osd,
         struct osd_inode_id *id;
         const struct dt_key *key;
 
-        if (fid_is_igif(fid))
-                return 0;
+       if (fid_is_igif(fid) || unlikely(fid_seq(fid) == FID_SEQ_DOT_LUSTRE))
+               return 0;
 
-        if (fid_is_idif(fid) || fid_seq(fid) == FID_SEQ_LLOG)
-                return osd_compat_objid_insert(info, osd, fid, id0, th);
+       if (fid_is_idif(fid) || fid_seq(fid) == FID_SEQ_LLOG)
+               return osd_compat_objid_insert(info, osd, fid, id0, th);
 
-        /* notice we don't return immediately, but continue to get into OI */
-        if (unlikely(fid_seq(fid) == FID_SEQ_LOCAL_FILE))
-                osd_compat_spec_insert(info, osd, fid, id0, th);
+       /* Server mount should not depends on OI files */
+       if (unlikely(fid_seq(fid) == FID_SEQ_LOCAL_FILE))
+               return osd_compat_spec_insert(info, osd, fid, id0, th);
 
         fid_cpu_to_be(oi_fid, fid);
         key = (struct dt_key *)oi_fid;
@@ -589,9 +584,6 @@ int osd_oi_delete(struct osd_thread_info *info,
         struct lu_fid       *oi_fid = &info->oti_fid;
         const struct dt_key *key;
 
-        if (!fid_is_norm(fid))
-                return 0;
-
         LASSERT(fid_seq(fid) != FID_SEQ_LOCAL_FILE);
 
         if (fid_is_idif(fid) || fid_seq(fid) == FID_SEQ_LLOG)