[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 5/5] block: Move request_alignment
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 5/5] block: Move request_alignment into BlockLimit |
Date: |
Fri, 3 Jun 2016 11:49:35 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 06/03/2016 11:03 AM, Eric Blake wrote:
> It makes more sense to have ALL block size limit constraints
> in the same struct. Improve the documentation while at it.
>
> Note that bdrv_refresh_limits() has to keep things alive across
> a memset() of BlockLimits.
>
> Signed-off-by: Eric Blake <address@hidden>
> ---
> include/block/block_int.h | 12 ++++++++----
> block.c | 4 ++--
> block/blkdebug.c | 4 ++--
> block/bochs.c | 2 +-
> block/cloop.c | 2 +-
> block/dmg.c | 2 +-
> block/io.c | 12 +++++++-----
> block/iscsi.c | 2 +-
> block/raw-posix.c | 16 ++++++++--------
> block/raw-win32.c | 6 +++---
> block/vvfat.c | 2 +-
> 11 files changed, 35 insertions(+), 29 deletions(-)
Something in this patch is causing qemu-iotests 77 to infloop; we may
decide it is just easier to drop this patch rather than find all the
places where the request_alignment must be preserved across what
otherwise zeroes out limits.
> +++ b/block/io.c
> @@ -71,8 +71,10 @@ void bdrv_refresh_limits(BlockDriverState *bs, Error
> **errp)
> {
> BlockDriver *drv = bs->drv;
> Error *local_err = NULL;
> + uint32_t request_alignment = bs->bl.request_alignment;
>
> memset(&bs->bl, 0, sizeof(bs->bl));
> + bs->bl.request_alignment = request_alignment;
Or put another way, it looks like I missed another case where moving the
scope of the variable can impact who is expecting the value to remain
unchanged across certain operations.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
Re: [Qemu-block] [PATCH 5/5] block: Move request_alignment into BlockLimit, Kevin Wolf, 2016/06/07
[Qemu-block] [PATCH 4/5] block: Switch discard length bounds to byte-based, Eric Blake, 2016/06/03