[Top][All Lists]

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

Re: [Qemu-block] [Qemu-devel] [PATCH] block: Formats don't need CONSISTE

From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH] block: Formats don't need CONSISTENT_READ with NO_IO
Date: Fri, 1 Dec 2017 07:42:32 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 12/01/2017 06:41 AM, Kevin Wolf wrote:

I guess it is the block of writes/resizes that prevents metadata from
getting inconsistent; CONSISTENT_READ does indeed make more sense if
interpreted solely in light of will the guest read consistent data
(and not will the format layer see consistent contents from the
protocol layer).

Yes, that's what the write/resize locks are meant for.

Consistent read is more about "this image may not contain the useful
data you're expecting".

I'm not opposed to your patch, but am trying to make sure that I'm not
overlooking any problem before giving R-b.  Maybe it's just that the
comment needs updating in v2.

Do you have a suggestion for the comment?


Commit 1f4ad7d fixed 'qemu-img info' for raw images that are currently
in use as a mirror target. It is not enough for image formats, though,
as these still unconditionally request BLK_PERM_CONSISTENT_READ.

As this permission is geared towards whether the guest-visible data is consistent, and has no impact on whether the metadata is sane, and 'qemu-img info' does not read guest-visible data (except for the raw format), it makes sense to not require BLK_PERM_CONSISTENT_READ if there is not going to be any guest I/O performed, regardless of image format.

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

reply via email to

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