]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Incremental: remove partitions when assembling.
authorNeilBrown <neilb@suse.de>
Tue, 14 May 2013 02:06:27 +0000 (12:06 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 14 May 2013 02:06:27 +0000 (12:06 +1000)
We remove partitions for --create and --assemble, but not for
--incrmental.
So fix that ommision.

Signed-off-by: NeilBrown <neilb@suse.de>
Incremental.c

index d5656ccd2532662bb73b734c2c4b3f6218a2bb7e..e7887faca27f2b83ad065e18d808276007857fe8 100644 (file)
@@ -286,7 +286,9 @@ int Incremental(char *devname, struct context *c,
        }
        /* Cannot hold it open while we add the device to the array,
         * so we must release the O_EXCL and depend on the map_lock()
+        * So now is the best time to remove any partitions.
         */
+       remove_partitions(dfd);
        close(dfd);
        dfd = -1;