From: NeilBrown Date: Tue, 14 May 2013 02:06:27 +0000 (+1000) Subject: Incremental: remove partitions when assembling. X-Git-Tag: mdadm-3.3-rc1~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83785d301f83fbda9912446b6bd714f0f82f711b;p=thirdparty%2Fmdadm.git Incremental: remove partitions when assembling. We remove partitions for --create and --assemble, but not for --incrmental. So fix that ommision. Signed-off-by: NeilBrown --- diff --git a/Incremental.c b/Incremental.c index d5656ccd..e7887fac 100644 --- a/Incremental.c +++ b/Incremental.c @@ -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;