mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 10:43:43 +00:00
raid5-cache: handle journal hotadd in quiesce
Handle journal hotadd in quiesce to avoid creating duplicated threads. Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
parent
87d4d91616
commit
16a43f6a65
@ -827,6 +827,13 @@ void r5l_quiesce(struct r5l_log *log, int state)
|
|||||||
return;
|
return;
|
||||||
if (state == 0) {
|
if (state == 0) {
|
||||||
log->in_teardown = 0;
|
log->in_teardown = 0;
|
||||||
|
/*
|
||||||
|
* This is a special case for hotadd. In suspend, the array has
|
||||||
|
* no journal. In resume, journal is initialized as well as the
|
||||||
|
* reclaim thread.
|
||||||
|
*/
|
||||||
|
if (log->reclaim_thread)
|
||||||
|
return;
|
||||||
log->reclaim_thread = md_register_thread(r5l_reclaim_thread,
|
log->reclaim_thread = md_register_thread(r5l_reclaim_thread,
|
||||||
log->rdev->mddev, "reclaim");
|
log->rdev->mddev, "reclaim");
|
||||||
} else if (state == 1) {
|
} else if (state == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user