mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 11:13:58 +08:00
md-cluster: don't send msg if array is closing
If we close an array which resync thread is running, then we don't need the node to send msg since another node would launch the resync thread to continue the rest works. Also send a message is time consuming, we should avoid it. Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Reviewed-by: NeilBrown <neilb@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
This commit is contained in:
parent
0357ba27bd
commit
df8c676418
@ -1281,6 +1281,14 @@ static int resync_finish(struct mddev *mddev)
|
||||
|
||||
clear_bit(MD_RESYNCING_REMOTE, &mddev->recovery);
|
||||
dlm_unlock_sync(cinfo->resync_lockres);
|
||||
|
||||
/*
|
||||
* If resync thread is interrupted so we can't say resync is finished,
|
||||
* another node will launch resync thread to continue.
|
||||
*/
|
||||
if (test_bit(MD_CLOSING, &mddev->flags))
|
||||
return 0;
|
||||
else
|
||||
return resync_info_update(mddev, 0, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user