]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Finally remove auto-home-host
authorNeilBrown <neilb@suse.de>
Tue, 26 Apr 2011 23:58:49 +0000 (09:58 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 26 Apr 2011 23:58:49 +0000 (09:58 +1000)
This was #if-ed out for 3.0, but it really should go.
Gcc 4.6.0 complains that auto_update_home is set but not used
(which is true).

Reported-by: Tobias Powalowski <t.powa@gmx.de>
ReadMe.c
mdadm.8.in
mdadm.c

index 57c10f33cf64eac0b3726b799cf75af9f91c1c43..384e5355e121e7cdb41f29fb19ee513a75e511e9 100644 (file)
--- a/ReadMe.c
+++ b/ReadMe.c
@@ -143,9 +143,6 @@ struct option long_options[] = {
     {"write-mostly",0, 0, WriteMostly},
     {"re-add",    0, 0,  ReAdd},
     {"homehost",  1, 0,  HomeHost},
-#if 0
-    {"auto-update-homehost", 0, 0, AutoHomeHost},
-#endif
     {"symlinks",  1, 0,  Symlinks},
 
     /* For assemble */
index d6d8ffaff465f53b1f79b8228dc09db0574af710..d9b51473797b8cb6c72431370cccc5799943c417 100644 (file)
@@ -1068,16 +1068,6 @@ option can be used when an array has an internal bitmap which is
 corrupt in some way so that assembling the array normally fails.  It
 will cause any internal bitmap to be ignored.
 
-.ig
-.TP
-.B \-\-auto\-update\-homehost
-This flag is only meaningful with auto-assembly (see discussion below).
-In that situation, if no suitable arrays are found for this homehost,
-.I mdadm
-will rescan for any arrays at all and will assemble them and update the
-homehost to match the current host.
-..
-
 .SH For Manage mode:
 
 .TP
@@ -1646,25 +1636,6 @@ See
 .IR mdadm.conf (5)
 for further details.
 
-.ig
-If
-.I mdadm
-cannot find any array for the given host at all, and if
-.B \-\-auto\-update\-homehost
-is given, then
-.I mdadm
-will search again for any array (not just an array created for this
-host) and will assemble each assuming
-.BR \-\-update=homehost .
-This will change the host tag in the superblock so that on the next run,
-these arrays will be found without the second pass.  The intention of
-this feature is to support transitioning a set of md arrays to using
-homehost tagging.
-
-The reason for requiring arrays to be tagged with the homehost for
-auto assembly is to guard against problems that can arise when moving
-devices from one host to another.
-..
 Note: Auto assembly cannot be used for assembling and activating some
 arrays which are undergoing reshape.  In particular as the
 .B backup\-file
diff --git a/mdadm.c b/mdadm.c
index e01beec226b23e243b7aa382e33498cca2358a49..ec05e6e85decc61ec1820cd7ac5d2af5401d61d1 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -103,7 +103,6 @@ int main(int argc, char *argv[])
        char *shortopt = short_options;
        int dosyslog = 0;
        int rebuild_map = 0;
-       int auto_update_home = 0;
        char *subarray = NULL;
        char *remove_path = NULL;
        char *udev_filename = NULL;
@@ -365,11 +364,6 @@ int main(int argc, char *argv[])
                        chunk /= 2;
                        continue;
 
-#if 0
-               case O(ASSEMBLE,AutoHomeHost):
-                       auto_update_home = 1;
-                       continue;
-#endif
                case O(INCREMENTAL, 'e'):
                case O(CREATE,'e'):
                case O(ASSEMBLE,'e'):
@@ -1325,38 +1319,9 @@ int main(int argc, char *argv[])
                                                        cnt++;
                                                        acnt++;
                                                }
-                                               if (rv2 == 1)
-                                                       /* found something so even though assembly failed  we
-                                                        * want to avoid auto-updates
-                                                        */
-                                                       auto_update_home = 0;
                                        } while (rv2!=2);
                                        /* Incase there are stacked devices, we need to go around again */
                                } while (acnt);
-#if 0
-                               if (cnt == 0 && auto_update_home && homehost) {
-                                       /* Nothing found, maybe we need to bootstrap homehost info */
-                                       do {
-                                               acnt = 0;
-                                               do {
-                                                       rv2 = Assemble(
-                                                               ss, NULL,
-                                                               &ident,
-                                                               NULL, NULL, 0,
-                                                               readonly, runstop,
-                                                               "homehost",
-                                                               homehost,
-                                                               require_homehost,
-                                                               verbose-quiet, force);
-                                                       if (rv2==0) {
-                                                               cnt++;
-                                                               acnt++;
-                                                       }
-                                               } while (rv2!=2);
-                                               /* Incase there are stacked devices, we need to go around again */
-                                       } while (acnt);
-                               }
-#endif
                                if (cnt == 0 && rv == 0) {
                                        fprintf(stderr, Name ": No arrays found in config file or automatically\n");
                                        rv = 1;