Whamcloud - gitweb
LU-957 revert OI scrub patch
authorOleg Drokin <green@whamcloud.com>
Thu, 24 May 2012 04:40:21 +0000 (00:40 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 24 May 2012 04:43:08 +0000 (00:43 -0400)
The patch interactions with lut changes from LU-911
broke mdt mounting.

Revert "LU-957 scrub: Ancillary work for LFSCK/OI scrub"

This reverts commit eeb7850ac3eae797a3cc3fee1a18725674d4d95f.

Change-Id: Ic9a1d3e3da1e6d97d5db30b7d08656e68e4a0ba6
Signed-off-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/libcfs_debug.h
libcfs/libcfs/debug.c
lustre/include/lustre_disk.h
lustre/include/lustre_net.h
lustre/obdclass/obd_mount.c
lustre/osd-ldiskfs/osd_compat.c
lustre/osd-ldiskfs/osd_oi.c

index 0adf843..ebc8913 100644 (file)
@@ -26,8 +26,6 @@
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
- *
- * Copyright (c) 2012 Whamcloud, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -151,7 +149,6 @@ struct ptldebug_header {
 #define D_CONSOLE     0x02000000
 #define D_QUOTA       0x04000000
 #define D_SEC         0x08000000
-#define D_LFSCK       0x10000000 /* For both OI scrub and LFSCK */
 /* keep these in sync with lnet/{utils,libcfs}/debug.c */
 
 #define D_HSM         D_TRACE
index ee8977b..e2dec83 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2011, Whamcloud, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -249,8 +249,6 @@ libcfs_debug_dbg2str(int debug)
                 return "quota";
         case D_SEC:
                 return "sec";
-       case D_LFSCK:
-               return "lfsck";
         }
 }
 
index e9c150a..a0b7526 100644 (file)
@@ -214,7 +214,6 @@ struct lustre_mount_data {
                                         existing MGS services */
 #define LMD_FLG_WRITECONF    0x0040  /* Rewrite config log */
 #define LMD_FLG_NOIR         0x0080  /* NO imperative recovery */
-#define LMD_FLG_NOSCRUB      0x0100  /* Do not trigger scrub automatically */
 
 #define lmd_is_client(x) ((x)->lmd_flags & LMD_FLG_CLIENT)
 
@@ -477,7 +476,6 @@ struct lustre_sb_info {
 #define     s2lsi_nocast(sb) ((sb)->s_fs_info)
 
 #define     get_profile_name(sb)   (s2lsi(sb)->lsi_lmd->lmd_profile)
-#define     get_mount_flags(sb)    (s2lsi(sb)->lsi_lmd->lmd_flags)
 
 #endif /* __KERNEL__ */
 
index d57a325..3cecb0a 100644 (file)
@@ -986,11 +986,6 @@ struct ptlrpc_thread {
         struct lu_env *t_env;
 };
 
-static inline int thread_is_init(struct ptlrpc_thread *thread)
-{
-       return thread->t_flags == 0;
-}
-
 static inline int thread_is_stopped(struct ptlrpc_thread *thread)
 {
         return !!(thread->t_flags & SVC_STOPPED);
index 1a5cd05..5392644 100644 (file)
@@ -2193,9 +2193,6 @@ static int lmd_parse(char *options, struct lustre_mount_data *lmd)
                 } else if (strncmp(s1, "nomgs", 5) == 0) {
                         lmd->lmd_flags |= LMD_FLG_NOMGS;
                         clear++;
-               } else if (strncmp(s1, "noscrub", 7) == 0) {
-                       lmd->lmd_flags |= LMD_FLG_NOSCRUB;
-                       clear++;
                 } else if (strncmp(s1, "writeconf", 9) == 0) {
                         lmd->lmd_flags |= LMD_FLG_WRITECONF;
                         clear++;
index 0af8f75..a98503a 100644 (file)
@@ -559,7 +559,7 @@ int osd_compat_spec_lookup(struct osd_thread_info *info,
 
         name = oid2name(fid_oid(fid));
         if (name == NULL || strlen(name) == 0)
-               RETURN(-ENOENT);
+                return -ERESTART;
 
         dentry = ll_lookup_one_len(name, osd_sb(osd)->s_root, strlen(name));
         if (!IS_ERR(dentry)) {
index cfd308b..3e3279a 100644 (file)
@@ -456,8 +456,11 @@ 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))
-                       return osd_compat_spec_lookup(info, osd, fid, id);
+                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;
+                }
 
                 fid_cpu_to_be(oi_fid, fid);
                 key = (struct dt_key *)oi_fid;
@@ -473,6 +476,8 @@ int osd_oi_lookup(struct osd_thread_info *info, struct osd_device *osd,
                         rc = -ENOENT;
                 }
         }
+
+out:
         return rc;
 }
 
@@ -530,15 +535,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) || unlikely(fid_seq(fid) == FID_SEQ_DOT_LUSTRE))
-               return 0;
+        if (fid_is_igif(fid))
+                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);
 
-       /* 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);
+        /* 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);
 
         fid_cpu_to_be(oi_fid, fid);
         key = (struct dt_key *)oi_fid;
@@ -584,6 +589,9 @@ 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)