Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16a43f6a authored by Shaohua Li's avatar Shaohua Li Committed by NeilBrown
Browse files

raid5-cache: handle journal hotadd in quiesce



Handle journal hotadd in quiesce to avoid creating duplicated threads.

Signed-off-by: default avatarShaohua Li <shli@fb.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.com>
parent 87d4d916
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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) {