[Top][All Lists]

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

Re: [Qemu-block] [Qemu-devel] qemu NBD client behaviour when device size

From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] qemu NBD client behaviour when device size is not a multiple of 512
Date: Wed, 1 Aug 2018 10:34:48 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 07/31/2018 01:25 PM, Eric Blake wrote:
On 07/31/2018 01:00 PM, Richard W.M. Jones wrote:

Hi Eric.  Is this a bug?

Note that with qemu as server:

$ truncate --size=1023 file
$ qemu-nbd -f raw -x '' file

the client now sees:

address@hidden:nbd_opt_go_info_block_size Block sizes are 0x200, 0x1000, 0x2000000
address@hidden:nbd_receive_negotiate_size_flags Size is 1024, export flags 0x1ed

where qemu as server is 0-padding the source file in all read requests; and that probably explains why I haven't noticed the problem with unaligned images in the client before (since qemu as NBD server doesn't advertise unaligned images).  What's more, a write request to the tail of the partial sector (when not using a read-only connection) succeeds, and resizes the file in the process (at least, on protocols that support live resizing); but I wouldn't count on it behaving sanely for all protocols.

What's more, with qemu as server, then 'qemu-img map' as client dies because the server is sending incorrect data according to protocol.

At any rate, you've given me plenty to work with for fixing things, although it probably won't make it into 3.0-rc3 and I don't know if we'll have an -rc4.

Not a regression introduce in 3.0 (it exists in 2.12), so not serious enough of a show-stopper to cause an -rc4 release.

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]