From: Stefan Weil <sw@weilnetz.de>
To: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
Cc: Zhe Qiu <phoeagon@gmail.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4] block/vdi: Use bdrv_flush after metadata updates
Date: Fri, 08 May 2015 23:26:27 +0200 [thread overview]
Message-ID: <554D2A03.3080201@weilnetz.de> (raw)
In-Reply-To: <20150508135512.GJ4318@noname.redhat.com>
Am 08.05.2015 um 15:55 schrieb Kevin Wolf:
> Am 08.05.2015 um 15:14 hat Max Reitz geschrieben:
>> On 07.05.2015 17:16, Zhe Qiu wrote:
>>> In reference to b0ad5a45...078a458e, metadata writes to
>>> qcow2/cow/qcow/vpc/vmdk are all synced prior to succeeding writes.
>>>
>>> Only when write is successful that bdrv_flush is called.
>>>
>>> Signed-off-by: Zhe Qiu <phoeagon@gmail.com>
>>> ---
>>> block/vdi.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>> I missed Kevin's arguments before, but I think that adding this is
>> more correct than not having it; and when thinking about speed, this
>> is vdi, a format supported for compatibility.
> If you use it only as a convert target, you probably care more about
> speed than about leaks in case of a host crash.
>
>> So if we wanted to optimize it, we'd probably have to cache multiple
>> allocations, do them at once and then flush afterwards (like the
>> metadata cache we have in qcow2?)
> That would defeat the purpose of this patch which aims at having
> metadata and data written out almost at the same time. On the other
> hand, fully avoiding the problem instead of just making the window
> smaller would require a journal, which VDI just doesn't have.
>
> I'm not convinced of this patch, but I'll defer to Stefan Weil as the
> VDI maintainer.
>
> Kevin
Thanks for asking. I share your concerns regarding reduced performance
caused by bdrv_flush. Conversions to VDI will take longer (how much?),
and also installation of an OS on a new VDI disk image will be slower
because that are the typical scenarios where the disk usage grows.
@phoeagon: Did the benchmark which you used allocate additional disk
storage? If not or if it only allocated once and then spent some time
on already allocated blocks, that benchmark was not valid for this case.
On the other hand I don't see a need for the flushing because the kind
of failures (power failure) and their consequences seem to be acceptable
for typical VDI usage, namely either image conversion or tests with
existing images.
That's why I'd prefer not to use bdrv_flush here. Could we make
bdrv_flush optional (either generally or for cases like this one) so
both people who prefer speed and people who would want
bdrv_flush to decrease the likelihood of inconsistencies can be
satisfied?
Stefan
next prev parent reply other threads:[~2015-05-08 21:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 4:04 [Qemu-devel] [PATCH v3] block/vdi: Use bdrv_flush after metadata updates Zhe Qiu
2015-05-07 10:09 ` Stefan Hajnoczi
2015-05-07 15:05 ` [Qemu-devel] [Qemu-block] " Eric Blake
2015-05-07 15:16 ` [Qemu-devel] [PATCH v4] " Zhe Qiu
2015-05-08 13:14 ` Max Reitz
2015-05-08 13:55 ` Kevin Wolf
2015-05-08 14:43 ` phoeagon
2015-05-08 21:26 ` Stefan Weil [this message]
2015-05-09 3:54 ` phoeagon
2015-05-09 3:59 ` phoeagon
2015-05-09 6:39 ` Stefan Weil
2015-05-09 7:41 ` phoeagon
2015-05-10 15:01 ` Paolo Bonzini
2015-05-10 16:02 ` Stefan Weil
2015-05-10 16:05 ` phoeagon
2015-05-10 16:10 ` Paolo Bonzini
2015-05-10 16:26 ` Stefan Weil
2015-05-10 17:14 ` phoeagon
2015-05-08 10:43 ` [Qemu-devel] [Qemu-block] [PATCH v3] " Kevin Wolf
2015-05-08 11:50 ` phoeagon
2015-05-08 12:02 ` Kevin Wolf
2015-05-08 12:56 ` phoeagon
2015-05-08 13:10 ` [Qemu-devel] " Max Reitz
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=554D2A03.3080201@weilnetz.de \
--to=sw@weilnetz.de \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=phoeagon@gmail.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.