summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2015-05-13 04:41:48 +0200
committerNeilBrown <neilb@suse.de>2015-05-13 04:41:48 +0200
commitec6db5ba712a23ccbcb5ad18f8506d366cb4b662 (patch)
tree3e107256d804687893b671bd2241611e38c9b808 /Assemble.c
parentDDF: _write_super_to_disk: fix anchor header type (diff)
downloadmdadm-ec6db5ba712a23ccbcb5ad18f8506d366cb4b662.tar.xz
mdadm-ec6db5ba712a23ccbcb5ad18f8506d366cb4b662.zip
Assemble: don't check for pre-existing array when updating uuid.
This is a very corner-case, but the self-tests tripped on it, and it makes sense not to trust the uuid when it is being changed. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Assemble.c b/Assemble.c
index 25a103d8..42710a8a 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1348,7 +1348,10 @@ try_again:
*/
if (map_lock(&map))
pr_err("failed to get exclusive lock on mapfile - continue anyway...\n");
- mp = map_by_uuid(&map, content->uuid);
+ if (c->update && strcmp(c->update,"uuid") == 0)
+ mp = NULL;
+ else
+ mp = map_by_uuid(&map, content->uuid);
if (mp) {
struct mdinfo *dv;
/* array already exists. */