Re: [Qemu-devel] [PATCH 1/1] nbd: increase maximum size of the PWRITE_ZERO request
- To: Eric Blake <eblake@redhat.com>
- Cc: Alex Bligh <alex@alex.org.uk>, Edgar Kaziakhmedov <edgar.kaziakhmedov@virtuozzo.com>, qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>, nbd list <nbd@other.debian.org>, vsementsov@virtuozzo.com, "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>, mreitz@redhat.com, den@openvz.org, Paolo Bonzini <pbonzini@redhat.com>
- Subject: Re: [Qemu-devel] [PATCH 1/1] nbd: increase maximum size of the PWRITE_ZERO request
- From: Alex Bligh <alex@alex.org.uk>
- Date: Sat, 10 Feb 2018 18:45:55 +0100
- Message-id: <[🔎] 10CE70C1-D812-485C-A498-8D5057D4F5A0@alex.org.uk>
- In-reply-to: <[🔎] B7504AC7-F974-4C7A-8FAA-C4D803C941E4@alex.org.uk>
- References: <20180208132336.6519-1-edgar.kaziakhmedov@virtuozzo.com> <[🔎] 8eb7f38c-ff46-df7d-1d43-d5c98bfd4ff2@redhat.com> <[🔎] B7504AC7-F974-4C7A-8FAA-C4D803C941E4@alex.org.uk>
> On 10 Feb 2018, at 18:43, Alex Bligh <alex@alex.org.uk> wrote:
>
> So I think a reasonable logic for Qemu would be to try NBD_CMD_INFO and find the maximum write size, and if that's unsupported use 0xffffffff (capping at export size, or export size minus write offset).
Ur actually capping it at (2^16 - blocksize) would be the right thing to do (writes should be multiples of the block size).
--
Alex Bligh
Reply to: