Re: [Qemu-devel] [PATCH] block: Formats don't need CONSISTENT_READ with NO_IO

2017-12-01 Thread Kevin Wolf
Am 30.11.2017 um 18:09 hat Eric Blake geschrieben: > On 11/30/2017 10:44 AM, Kevin Wolf wrote: > > 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_CO

Re: [Qemu-devel] [PATCH] block: Formats don't need CONSISTENT_READ with NO_IO

2017-12-01 Thread Kevin Wolf
Am 30.11.2017 um 20:05 hat Eric Blake geschrieben: > On 11/30/2017 12:27 PM, Kevin Wolf wrote: > > > > @@ -1936,7 +1938,9 @@ void bdrv_format_default_perms(BlockDriverState > > > > *bs, BdrvChild *c, > > > >/* bs->file always needs to be consistent because of the > > > > metadata. We

Re: [Qemu-devel] [PATCH] block: Formats don't need CONSISTENT_READ with NO_IO

2017-12-01 Thread Eric Blake
On 11/30/2017 12:27 PM, Kevin Wolf wrote: @@ -1936,7 +1938,9 @@ void bdrv_format_default_perms(BlockDriverState *bs, BdrvChild *c, /* bs->file always needs to be consistent because of the metadata. We * can never allow other users to resize or write to it. */ -perm

Re: [Qemu-devel] [PATCH] block: Formats don't need CONSISTENT_READ with NO_IO

2017-12-01 Thread Eric Blake
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 co

Re: [Qemu-devel] [PATCH] block: Formats don't need CONSISTENT_READ with NO_IO

2017-11-30 Thread Eric Blake
On 11/30/2017 10:44 AM, Kevin Wolf wrote: 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 meaningless unless you do

[Qemu-devel] [PATCH] block: Formats don't need CONSISTENT_READ with NO_IO

2017-11-30 Thread Kevin Wolf
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 meaningless unless you do actual I/O on the image, drop the requireme