summaryrefslogtreecommitdiffstats
path: root/Incremental.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-03-17 03:35:10 +0100
committerNeilBrown <neilb@suse.de>2011-03-17 03:35:10 +0100
commiteb0af52689656f6526540ee3a72b0647e7a7b20d (patch)
tree18f4df305e0bc84c7bae5b616b66f5d1bbb83b3c /Incremental.c
parentFix regression when using 'grow' to add a bitmap. (diff)
downloadmdadm-eb0af52689656f6526540ee3a72b0647e7a7b20d.tar.xz
mdadm-eb0af52689656f6526540ee3a72b0647e7a7b20d.zip
--stop: separate 'is busy' test for 'did it stop properly'.
Stopping an md array requires that there is no other user of it. However with udev and udisks and such there can be transient other users of md devices which can interfere with stopping the array. If there is a transient users, we really want "mdadm --stop" to wait a little while and retry. However if the array is genuinely in-use (e.g. mounted), then we don't want to wait at all - we want to fail immediately. So before trying to stop, re-open device with O_EXCL. If this fails then the device is probably in use, so give up. If it succeeds, but a subsequent STOP_ARRAY fails, then it is possibly a transient failure, so try again for a few seconds. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Incremental.c')
0 files changed, 0 insertions, 0 deletions