Whamcloud - gitweb
LU-15938 lod: prevent endless retry in recovery thread
[fs/lustre-release.git] / lustre / obdclass / obd_mount.c
index f9e46c6..bb4dd25 100644 (file)
@@ -1334,12 +1334,13 @@ int lmd_parse(char *options, struct lustre_mount_data *lmd)
                 * Parse non-ldiskfs options here. Rather than modifying
                 * ldiskfs, we just zero these out here
                 */
-               if (strncmp(s1, "abort_recov", 11) == 0) {
-                       lmd->lmd_flags |= LMD_FLG_ABORT_RECOV;
-                       clear++;
-               } else if (strncmp(s1, "abort_recov_mdt", 15) == 0) {
+               if (!strncmp(s1, "abort_recov_mdt", 15) ||
+                   !strncmp(s1, "abort_recovery_mdt", 18)) {
                        lmd->lmd_flags |= LMD_FLG_ABORT_RECOV_MDT;
                        clear++;
+               } else if (strncmp(s1, "abort_recov", 11) == 0) {
+                       lmd->lmd_flags |= LMD_FLG_ABORT_RECOV;
+                       clear++;
                } else if (strncmp(s1, "recovery_time_soft=", 19) == 0) {
                        lmd->lmd_recovery_time_soft =
                                max_t(int, simple_strtoul(s1 + 19, NULL, 10),
@@ -1576,114 +1577,3 @@ invalid:
        RETURN(-EINVAL);
 }
 EXPORT_SYMBOL(lmd_parse);
-
-#ifdef HAVE_SERVER_SUPPORT
-/**
- * This is the entry point for the mount call into Lustre.
- * This is called when a server target is mounted,
- * and this is where we start setting things up.
- * @param data Mount options (e.g. -o flock,abort_recov)
- */
-static int lustre_tgt_fill_super(struct super_block *sb, void *lmd2_data,
-                                int silent)
-{
-       struct lustre_mount_data *lmd;
-       struct lustre_sb_info *lsi;
-       int rc;
-
-       ENTRY;
-
-       CDEBUG(D_MOUNT|D_VFSTRACE, "VFS Op: sb %p\n", sb);
-
-       lsi = lustre_init_lsi(sb);
-       if (!lsi)
-               RETURN(-ENOMEM);
-       lmd = lsi->lsi_lmd;
-
-       /*
-        * Disable lockdep during mount, because mount locking patterns are
-        * 'special'.
-        */
-       lockdep_off();
-
-       /*
-        * LU-639: the OBD cleanup of last mount may not finish yet, wait here.
-        */
-       obd_zombie_barrier();
-
-       /* Figure out the lmd from the mount options */
-       if (lmd_parse(lmd2_data, lmd)) {
-               lustre_put_lsi(sb);
-               GOTO(out, rc = -EINVAL);
-       }
-
-       if (lmd_is_client(lmd)) {
-               rc = -ENODEV;
-               CERROR("%s: attempting to mount a client with -t lustre_tgt' which is only for server-side mounts: rc = %d\n",
-                      lmd->lmd_dev, rc);
-               lustre_put_lsi(sb);
-               GOTO(out, rc);
-       }
-
-       CDEBUG(D_MOUNT, "Mounting server from %s\n", lmd->lmd_dev);
-       rc = server_fill_super(sb);
-       /*
-        * server_fill_super calls lustre_start_mgc after the mount
-        * because we need the MGS NIDs which are stored on disk.
-        * Plus, we may need to start the MGS first.
-        *
-        * server_fill_super will call server_put_super on failure
-        *
-        * If error happens in fill_super() call, @lsi will be killed there.
-        * This is why we do not put it here.
-        */
-out:
-       if (rc) {
-               CERROR("Unable to mount %s (%d)\n",
-                      s2lsi(sb) ? lmd->lmd_dev : "", rc);
-       } else {
-               CDEBUG(D_SUPER, "Mount %s complete\n",
-                      lmd->lmd_dev);
-       }
-       lockdep_on();
-       return rc;
-}
-
-/***************** FS registration ******************/
-static struct dentry *lustre_tgt_mount(struct file_system_type *fs_type,
-                                      int flags, const char *devname,
-                                      void *data)
-{
-       return mount_nodev(fs_type, flags, data, lustre_tgt_fill_super);
-}
-
-/* Register the "lustre_tgt" fs type.
- *
- * Right now this isn't any different than the normal "lustre" filesystem
- * type, but it is added so that there is some compatibility to allow
- * changing documentation and scripts to start using the "lustre_tgt" type
- * at mount time. That will simplify test interop, and in case of upgrades
- * that change to the new type and then need to roll back for some reason.
- *
- * The long-term goal is to disentangle the client and server mount code.
- */
-static struct file_system_type lustre_tgt_fstype = {
-       .owner          = THIS_MODULE,
-       .name           = "lustre_tgt",
-       .mount          = lustre_tgt_mount,
-       .kill_sb        = kill_anon_super,
-       .fs_flags       = FS_REQUIRES_DEV | FS_RENAME_DOES_D_MOVE,
-};
-MODULE_ALIAS_FS("lustre_tgt");
-
-int lustre_tgt_register_fs(void)
-{
-       return register_filesystem(&lustre_tgt_fstype);
-}
-
-void lustre_tgt_unregister_fs(void)
-{
-       unregister_filesystem(&lustre_tgt_fstype);
-}
-
-#endif /* HAVE_SERVER_SUPPORT */