[sheepdog] [PATCH] sheep: initialize recovery work queue only when cache is enabled
levin li
levin108 at gmail.com
Wed Aug 29 08:47:57 CEST 2012
From: levin li <xingke.lwp at taobao.com>
Signed-off-by: levin li <xingke.lwp at taobao.com>
---
sheep/sheep.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/sheep/sheep.c b/sheep/sheep.c
index ea25a05..b23a312 100644
--- a/sheep/sheep.c
+++ b/sheep/sheep.c
@@ -373,9 +373,13 @@ int main(int argc, char **argv)
sys->deletion_wqueue = init_work_queue("deletion", true);
sys->block_wqueue = init_work_queue("block", true);
sys->sockfd_wqueue = init_work_queue("sockfd", true);
- sys->reclaim_wqueue = init_work_queue("reclaim", true);
+ if (sys->enable_write_cache) {
+ sys->reclaim_wqueue = init_work_queue("reclaim", true);
+ if (!sys->sockfd_wqueue)
+ exit(1);
+ }
if (!sys->gateway_wqueue || !sys->io_wqueue ||!sys->recovery_wqueue ||
- !sys->deletion_wqueue || !sys->block_wqueue || !sys->reclaim_wqueue)
+ !sys->deletion_wqueue || !sys->block_wqueue || !sys->sockfd_wqueue)
exit(1);
ret = trace_init();
--
1.7.1
More information about the sheepdog
mailing list