Skip to content

Commit

Permalink
raid5-cache: handle journal hotadd in quiesce
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shaohua Li authored and NeilBrown committed Jan 14, 2016
1 parent 87d4d91 commit 16a43f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/md/raid5-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,13 @@ void r5l_quiesce(struct r5l_log *log, int state)
return;
if (state == 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->rdev->mddev, "reclaim");
} else if (state == 1) {
Expand Down

0 comments on commit 16a43f6

Please sign in to comment.