[sheepdog] [PATCH] dog/farm: multi-thread cluster snapshot, save process

Ruoyu liangry at ucweb.com
Fri Aug 8 11:02:48 CEST 2014


Will the operation affect VM?
If yes, it would be better to let user choose it.

Yuan wrote:

There is no reason we can't multi-thread it. Let's go multi-threading and enjoy
boost.

Signed-off-by: Liu Yuan<namei.unix at gmail.com>
---
  dog/farm/farm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dog/farm/farm.c b/dog/farm/farm.c
index e4f532e..fae57fc 100644
--- a/dog/farm/farm.c
+++ b/dog/farm/farm.c
@@ -357,7 +357,7 @@ int farm_save_snapshot(const char *tag)
  
  	strbuf_init(&trunk_buf, sizeof(struct trunk_entry) * nr_objects);
  
-	wq = create_work_queue("save snapshot", WQ_ORDERED);
+	wq = create_work_queue("save snapshot", WQ_DYNAMIC);
  	if (for_each_object_in_tree(queue_save_snapshot_work,
  				    &trunk_buf) < 0) {
  		ret = -1;






More information about the sheepdog mailing list