From: Kevin Wolf <kwolf@redhat.com>
To: Ivan Ren <renyime@gmail.com>
Cc: mreitz@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3] qcow2: fix preallocation with metadata on bare block device
Date: Fri, 11 May 2018 19:29:01 +0200 [thread overview]
Message-ID: <20180511172901.GC5016@localhost.localdomain> (raw)
In-Reply-To: <1526053004-12268-1-git-send-email-ivanren@tencent.com>
Am 11.05.2018 um 17:36 hat Ivan Ren geschrieben:
> Create a qcow2 directly on bare block device with
> "-o preallocation=metadata" option. When read this qcow2, it will
> return pre-existing data on block device. This patch add
> QCOW_OFLAG_ZERO flag (supported in qcow_version >= 3) for
> preallocated l2 entry to avoid this problem.
>
> Signed-off-by: Ivan Ren <ivanren@tencent.com>
Doesn't this defeat the purpose of preallocation? Usually, the idea with
preallocation is that you don't need to update any metadata on the first
write, but if you set QCOW_OFLAG_ZERO, we do need a metadata update
again.
So what's the advantage compared to not preallocating at all?
Kevin
next prev parent reply other threads:[~2018-05-11 17:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 15:36 [Qemu-devel] [PATCH v3] qcow2: fix preallocation with metadata on bare block device Ivan Ren
2018-05-11 17:29 ` Kevin Wolf [this message]
2018-05-13 13:37 ` Ivan Ren
2018-05-14 6:23 ` Kevin Wolf
2018-05-14 14:30 ` Ivan Ren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180511172901.GC5016@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=renyime@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).