summaryrefslogtreecommitdiff
path: root/msg.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-03-17 13:35:10 +1100
committerNeilBrown <neilb@suse.de>2011-03-17 13:35:10 +1100
commiteb0af52689656f6526540ee3a72b0647e7a7b20d (patch)
tree18f4df305e0bc84c7bae5b616b66f5d1bbb83b3c /msg.c
parent1d8862cf613d671bcfbb796ca023161d2b907402 (diff)
--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 'msg.c')
0 files changed, 0 insertions, 0 deletions