From: NeilBrown Date: Tue, 26 Apr 2011 23:58:49 +0000 (+1000) Subject: Finally remove auto-home-host X-Git-Tag: mdadm-3.2.2~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e90264df5060cd308ce56206ec7dfa29e2aa041;p=thirdparty%2Fmdadm.git Finally remove auto-home-host 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 --- diff --git a/ReadMe.c b/ReadMe.c index 57c10f33..384e5355 100644 --- 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 */ diff --git a/mdadm.8.in b/mdadm.8.in index d6d8ffaf..d9b51473 100644 --- a/mdadm.8.in +++ b/mdadm.8.in @@ -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 e01beec2..ec05e6e8 100644 --- 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;