diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2016-08-12 07:42:37 +0200 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-09-21 18:09:44 +0200 |
commit | af8d8e6f031589ccf32b08eea91def53db8cfa95 (patch) | |
tree | 8886cf9729818c51bec074df32d53ce61244a69d /drivers/md/dm-kcopyd.c | |
parent | md-cluster: remove some unnecessary dlm_unlock_sync (diff) | |
download | linux-af8d8e6f031589ccf32b08eea91def53db8cfa95.tar.xz linux-af8d8e6f031589ccf32b08eea91def53db8cfa95.zip |
md: changes for MD_STILL_CLOSED flag
When stop clustered raid while it is pending on resync,
MD_STILL_CLOSED flag could be cleared since udev rule
is triggered to open the mddev. So obviously array can't
be stopped soon and returns EBUSY.
mdadm -Ss md-raid-arrays.rules
set MD_STILL_CLOSED md_open()
... ... ... clear MD_STILL_CLOSED
do_md_stop
We make below changes to resolve this issue:
1. rename MD_STILL_CLOSED to MD_CLOSING since it is set
when stop array and it means we are stopping array.
2. let md_open returns early if CLOSING is set, so no
other threads will open array if one thread is trying
to close it.
3. no need to clear CLOSING bit in md_open because 1 has
ensure the bit is cleared, then we also don't need to
test CLOSING bit in do_md_stop.
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/dm-kcopyd.c')
0 files changed, 0 insertions, 0 deletions