[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to stop QEMU punching holes in backing store
From: |
Nir Soffer |
Subject: |
Re: How to stop QEMU punching holes in backing store |
Date: |
Fri, 9 Aug 2024 02:53:27 +0300 |
On Sat, Jun 29, 2024 at 12:19 AM Nir Soffer <nsoffer@redhat.com> wrote:
>
> On Wed, Jun 19, 2024 at 2:18 PM Nir Soffer <nsoffer@redhat.com> wrote:
> > On 19 Jun 2024, at 8:54, Justin <justin0@safe-mbox.com> wrote:
> >
> > I've run strace and I see calls to fallocate with these flags:
> > FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE
> >
> > I've tried passing these options: discard=off,detect-zeroes=off but
> > this does not help. This is the full set of relevant options I'm
> > using:
> >
> > -drive
> > file=/vms/vm0/drive,format=raw,if=virtio,discard=off,detect-zeroes=
> > off
> >
> > You don't need to disable detect-zeros - in my tests it makes dd
> > if=/dev/zero
> > 5 times faster (770 MiB/s -> 3 GiB/s) since zero writes are converted to
> > fallocate(FALLOC_FL_KEEP_SIZE|FALLOC_FL_ZERO_RANGE).
> >
> > The issue seems to be ignoring the discard option when opening the image,
> > and is fixed by this:
> > https://lists.nongnu.org/archive/html/qemu-block/2024-06/msg00198.html
> >
> > Thanks. When might this patch (or something similar) be merged?
> >
> > The patch need more work, when the work is done and qemu maintainers are
> > happy it is a good estimate :-)
>
> Justin, v3 should be ready now, do you want to help by testing it?
>
> v3:
> https://lists.nongnu.org/archive/html/qemu-block/2024-06/msg00644.html
>
> You can also pull it from:
> https://gitlab.com/nirs/qemu/-/tree/consider-discard-option
The fix is included in QEMU 9.1.0-rc0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: How to stop QEMU punching holes in backing store,
Nir Soffer <=