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>
This commit is contained in:
NeilBrown 2015-05-13 12:41:48 +10:00
parent b87fdf4e89
commit ec6db5ba71
1 changed files with 4 additions and 1 deletions

View File

@ -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. */