mdadm should not wait indefinitely when it trys to reset
superblock on device which is busy (cannot be opened).
Acked-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: Artur Wojcik <artur.wojcik@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
/*
* Nothing fancy about Kill. It just zeroes out a superblock
* Definitely not safe.
/*
* Nothing fancy about Kill. It just zeroes out a superblock
* Definitely not safe.
+ * Returns:
+ * 0 - a zero superblock was successfully written out
+ * 1 - failed to write the zero superblock
+ * 2 - failed to open the device or find a superblock.
if (!quiet)
fprintf(stderr, Name ": Couldn't open %s for write - not zeroing\n",
dev);
if (!quiet)
fprintf(stderr, Name ": Couldn't open %s for write - not zeroing\n",
dev);
}
if (st == NULL)
st = guess_super(fd);
}
if (st == NULL)
st = guess_super(fd);
do {
rv |= Kill(dv->devname, NULL, force, q, 0);
q = 1;
do {
rv |= Kill(dv->devname, NULL, force, q, 0);
q = 1;
- } while ((rv & 2) == 0);