[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Detect zero writes (for discussion only, not to
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-devel] [PATCH] Detect zero writes (for discussion only, not to be applied) |
Date: |
Fri, 27 Jul 2012 08:55:31 -0500 |
User-agent: |
Notmuch/0.13.2+93~ged93d79 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) |
"Richard W.M. Jones" <address@hidden> writes:
> [Applies against qemu 1.1.0, not HEAD, because qemu from git seems to
> be broken at the moment. But the patch is easy to rebase.]
How's it broken?
Regards,
Anthony Liguori
> This patch adds a -drive detect_zero=on|off flag (defaults to "off").
>
> Setting this on causes the write path to detect all zero byte writes
> and, for block device drivers which support this, turn the request
> into the more space-efficient bdrv_co_do_write_zeroes call.
>
> The use case is for virt-sparsify. We want to create an intermediate
> qcow2 overlay file which we know will mostly contain zeroes, and we
> want qcow2 to handle this without creating a huge empty file. In my
> testing, the size of the intermediate file is reduced considerably
> (down to about 1/4 of the original size), making sparsification of
> large mostly-empty guests possible for the first time.
>
> The implementation is very simple-minded. It tests if the entire
> request is all zero bytes or not. A better implementation would
> almost certainly be even more space-efficient, but at the cost of
> splitting some write requests (if that's a problem).
>
> Testing: I booted and tested an F16 guest with this patch and the
> setting "on", without problems. I also modified libguestfs to add
> this flag, then ran the whole libguestfs test suite with no reported
> problems.
>
> Rich.
- [Qemu-devel] [PATCH] Detect zero writes (for discussion only, not to be applied), Richard W.M. Jones, 2012/07/26
- [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes., Richard W.M. Jones, 2012/07/26
- Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes., Anthony Liguori, 2012/07/27
- Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes., Paolo Bonzini, 2012/07/27
- Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes., Richard W.M. Jones, 2012/07/30
- Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes., Paolo Bonzini, 2012/07/30
- Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes., Eric Blake, 2012/07/30
- Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes., Paolo Bonzini, 2012/07/30
- Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes., Kevin Wolf, 2012/07/30
- Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes., Richard W.M. Jones, 2012/07/30
Re: [Qemu-devel] [PATCH] Detect zero writes (for discussion only, not to be applied),
Anthony Liguori <=