Whamcloud - gitweb
LU-1014 mountconf: Revert "MGS should process parameter config"
[fs/lustre-release.git] / lustre / obdclass / obd_mount.c
index 5392644..890d409 100644 (file)
@@ -198,13 +198,18 @@ struct lustre_mount_info *server_get_mount_2(const char *name)
 
 static void unlock_mntput(struct vfsmount *mnt)
 {
-        if (kernel_locked()) {
-                cfs_unlock_kernel();
-                mntput(mnt);
-                cfs_lock_kernel();
-        } else {
-                mntput(mnt);
-        }
+#ifdef HAVE_KERNEL_LOCKED
+       /* for kernel < 2.6.37 */
+       if (kernel_locked()) {
+               unlock_kernel();
+               mntput(mnt);
+               lock_kernel();
+       } else {
+               mntput(mnt);
+       }
+#else
+       mntput(mnt);
+#endif
 }
 
 static int lustre_put_lsi(struct super_block *sb);
@@ -1543,7 +1548,7 @@ static void server_wait_finished(struct vfsmount *mnt)
                        (mnt_get_count(mnt) == 1),
                        cfs_time_seconds(3),
                        rc);
-               cfs_block_sigs(blocked);
+              cfs_restore_sigs(blocked);
                if (rc < 0) {
                        LCONSOLE_EMERG("Danger: interrupted umount %s with "
                                       "%d refs!\n", mnt->mnt_devname,
@@ -1612,23 +1617,8 @@ static void server_put_super(struct super_block *sb)
            should have put it on a different device. */
         if (IS_MGS(lsi->lsi_ldd)) {
                 /* if MDS start with --nomgs, don't stop MGS then */
-                if (!(lsi->lsi_lmd->lmd_flags & LMD_FLG_NOMGS)) {
-                        char *logname;
-
-                        OBD_ALLOC(logname, MGS_PARAM_MAXLEN);
-                        if (!logname) {
-                                LCONSOLE_WARN("Stopping mgs failed %d, please "
-                                              "try again.", -ENOMEM);
-                                return;
-                        }
-                        strcpy(logname, lsi->lsi_ldd->ldd_fsname);
-                        strcat(logname, "-params");
-                        /* tell the mgc to drop parameter config log */
-                        lustre_end_log(sb, logname, NULL);
-                        OBD_FREE(logname, MGS_PARAM_MAXLEN);
-
+                if (!(lsi->lsi_lmd->lmd_flags & LMD_FLG_NOMGS))
                         server_stop_mgs(sb);
-                }
         }
 
         /* Clean the mgc and sb */
@@ -1841,25 +1831,6 @@ static int server_fill_super(struct super_block *sb)
            Client will not finish until all servers are connected.
            Note - MGS-only server does NOT get a client, since there is no
            lustre fs associated - the MGS is for all lustre fs's */
-        } else if (IS_MGS(lsi->lsi_ldd) &&
-                   !(lsi->lsi_lmd->lmd_flags & LMD_FLG_NOMGS)){
-                struct config_llog_instance cfg;
-                char *logname;
-
-                OBD_ALLOC(logname, MGS_PARAM_MAXLEN);
-                if (logname == NULL)
-                        GOTO(out_mnt, rc = -ENOMEM);
-                strcpy(logname, lsi->lsi_ldd->ldd_fsname);
-                strcat(logname, "-params");
-
-                memset(&cfg, 0, sizeof(cfg));
-                rc = lustre_process_log(sb, logname, &cfg);
-                OBD_FREE(logname, MGS_PARAM_MAXLEN);
-                if (rc) {
-                        CERROR("failed to process parameters %s: %d\n",
-                               logname, rc);
-                        GOTO(out_mnt, rc);
-                }
         }
 
         rc = server_fill_super_common(sb);
@@ -2193,6 +2164,9 @@ 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++;