projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87d4d91
)
raid5-cache: handle journal hotadd in quiesce
author
Shaohua Li
<
[email protected]
>
Wed, 6 Jan 2016 22:37:15 +0000
(14:37 -0800)
committer
NeilBrown
<
[email protected]
>
Thu, 14 Jan 2016 00:49:43 +0000
(11:49 +1100)
Handle journal hotadd in quiesce to avoid creating duplicated threads.
Signed-off-by: Shaohua Li <
[email protected]
>
Signed-off-by: NeilBrown <
[email protected]
>
drivers/md/raid5-cache.c
patch
|
blob
|
history
diff --git
a/drivers/md/raid5-cache.c
b/drivers/md/raid5-cache.c
index 7ac035a73281c61b60e9700d03521c68859ee4ab..9531f5f05b93df22d0c1d52381cf0a841173403a 100644
(file)
--- a/
drivers/md/raid5-cache.c
+++ b/
drivers/md/raid5-cache.c
@@
-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) {