[Sheepdog] [PATCH v3] sheep: change snapshot/clone flow

Liu Yuan namei.unix at gmail.com
Mon Apr 23 06:03:10 CEST 2012


On 04/23/2012 11:37 AM, HaiTing Yao wrote:

> I think you have applied my block/sheepdog.c patch for qemu project.
> There is still something to do. qemu-img is still having some problem
> with object cache when there is snapshot. The work is on the progress by
> Liuyuan as I knew. Perhaps you can shutdown object cache temporarily by
> this:


I don't have time to upstream fix of qemu-img snapshot&create for now.
The problem is qemu-img snapshot doesn't provide cache selection option
but use writeback cache as default.

we can specify a writethrough mode for 'qemu-img convert', but 'snapshot
& create' doesn't have this option.

below is quick fix for qemu-img snapshot & qemu-img create for sheepdog:

diff --git a/qemu-img.c b/qemu-img.c
index 0ae543c..aee2851 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -350,7 +350,7 @@ static int img_create(int argc, char **argv)
     }

     ret = bdrv_img_create(filename, fmt, base_filename, base_fmt,
-                          options, img_size, BDRV_O_FLAGS);
+                          options, img_size, 0);
 out:
     if (ret) {
         return 1;
@@ -1163,7 +1163,7 @@ static int img_snapshot(int argc, char **argv)
     int action = 0;
     qemu_timeval tv;

-    bdrv_oflags = BDRV_O_FLAGS | BDRV_O_RDWR;
+    bdrv_oflags = BDRV_O_RDWR;
     /* Parse commandline parameters */
     for(;;) {
         c = getopt(argc, argv, "la:c:d:h");



More information about the sheepdog mailing list