[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 3/6] nbd/client: Report offsets in bdrv_block
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-devel] [PATCH v3 3/6] nbd/client: Report offsets in bdrv_block_status |
Date: |
Fri, 29 Mar 2019 14:00:35 +0000 |
29.03.2019 7:27, Eric Blake wrote:
> It is desirable for 'qemu-img map' to have the same output for a file
> whether it is served over file or nbd protocols. However, ever since
> we implemented block status for NBD (2.12), the NBD protocol forgot to
> inform the block layer that as the final layer in the chain, the
> offset is valid; without an offset, the human-readable form of
> qemu-img map gives up with the unhelpful:
>
> $ nbdkit -U - data data="1" size=512 --run 'qemu-img map $nbd'
> Offset Length Mapped to File
> qemu-img: File contains external, encrypted or compressed clusters.
>
> The --output=json form always works, because it is reporting the
> lower-level bdrv_block_status results directly rather than trying to
> filter out sparse ranges for human consumption.
>
> With this patch, the output changes to:
>
> Offset Length Mapped to File
> 0 0x200 0
> nbd+unix://?socket=/tmp/nbdkitOxeoLa/socket
>
> This change is observable to several iotests.
>
> Fixes: 78a33ab5
> Reported-by: Richard W.M. Jones<address@hidden>
> Signed-off-by: Eric Blake<address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
--
Best regards,
Vladimir
- [Qemu-devel] [PATCH v3 1/6] iotests: Add 241 to test NBD on unaligned images, (continued)
- [Qemu-devel] [PATCH v3 3/6] nbd/client: Report offsets in bdrv_block_status, Eric Blake, 2019/03/29
- Re: [Qemu-devel] [PATCH v3 3/6] nbd/client: Report offsets in bdrv_block_status,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-devel] [PATCH v3 2/6] nbd/client: Lower min_block for block-status, unaligned size, Eric Blake, 2019/03/29
- Re: [Qemu-devel] [PATCH for-4.0 v3 0/6] NBD server alignment improvement, Richard W.M. Jones, 2019/03/29
- [Qemu-devel] [PATCH v3 7/6] nbd/client: Ignore inaccessible tail of inconsistent server, Eric Blake, 2019/03/29
- [Qemu-devel] [PATCH v3.1 3.5/6] nbd/client: Reject inaccessible tail of inconsistent server, Eric Blake, 2019/03/30
- [Qemu-devel] [PATCH v3 6.5/6] nbd/client: Trace server noncompliance on structured reads, Eric Blake, 2019/03/30