qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target o


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert
Date: Fri, 13 Sep 2013 13:35:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

Il 13/09/2013 12:46, Peter Lieven ha scritto:
>>>
>>>   -    flags = BDRV_O_RDWR;
>>> +    flags = BDRV_O_RDWR | BDRV_O_UNMAP;
>> I think this should be a new command-line flag.
> In an earlier version there where no objections. I think it would
> make the usage of qemu-img convert more complicated. For
> most targets has_zero_init is 1 anyway.

If Kevin is okay with having BDRV_O_UNMAP as the default that's fine.
However there should be an option to disable it.  Perhaps it could be
"-S 0" with something like this added:

diff --git a/qemu-img.c b/qemu-img.c
index 3e5e388..f42c90c 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -769,6 +769,10 @@
     int ret;
     int num_checked, num_used;

+    if (!min) {
+        return 1;
+    }
+
     if (n < min) {
         min = n;
     }


Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]