summaryrefslogtreecommitdiffstats
path: root/Incremental.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-05-11 15:16:49 +1000
committerNeilBrown <neilb@suse.de>2009-05-11 15:16:49 +1000
commit745f72f61ab363dbc1c19fd00cc29edc42571f62 (patch)
tree521efe574fa8741cf02b925369968e2a328d2478 /Incremental.c
parentd7ba0c55f07d24b51e6da1a5850d7164e9cf01d9 (diff)
downloadmdadm-745f72f61ab363dbc1c19fd00cc29edc42571f62.tar.gz
mdadm-745f72f61ab363dbc1c19fd00cc29edc42571f62.tar.xz
mdadm-745f72f61ab363dbc1c19fd00cc29edc42571f62.zip
assemble: support arrays created with --homehost=any
If an array is created with --homehost=any, then --assemble and --incremental will treat it as being local to 'this' host, no matter what the name of this host is. This is useful for array that will be given unique names and be moved between machines. This needs to be documented. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Incremental.c b/Incremental.c
index f7e602e..c13ea43 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -217,8 +217,9 @@ int Incremental(char *devname, int verbose, int runstop,
* on that. */
if (match)
trustworthy = LOCAL;
- else if (homehost == NULL ||
- st->ss->match_home(st, homehost) != 1)
+ else if ((homehost == NULL ||
+ st->ss->match_home(st, homehost) != 1) &&
+ st->ss->match_home(st, "any") != 1)
trustworthy = FOREIGN;
else
trustworthy = LOCAL;