[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 24/27] nbd: Implement NBD_CMD_WRITE_ZEROES on cli
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PULL 24/27] nbd: Implement NBD_CMD_WRITE_ZEROES on client |
Date: |
Tue, 15 Nov 2016 16:59:30 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
On 10/31/2016 09:37 AM, Paolo Bonzini wrote:
> From: Eric Blake <address@hidden>
>
> Upstream NBD protocol recently added the ability to efficiently
> write zeroes without having to send the zeroes over the wire,
> along with a flag to control whether the client wants a hole.
>
> The generic block code takes care of falling back to the obvious
> write of lots of zeroes if we return -ENOTSUP because the server
> does not have WRITE_ZEROES.
>
> Ideally, since NBD_CMD_WRITE_ZEROES does not involve any data
> over the wire, we want to support transactions that are much
> larger than the normal 32M limit imposed on NBD_CMD_WRITE. But
> the server may still have a limit smaller than UINT_MAX, so
> until experimental NBD protocol additions for advertising various
> command sizes is finalized (see [1], [2]), for now we just stick to
> the same limits as normal writes.
>
> [1] https://github.com/yoe/nbd/blob/extension-info/doc/proto.md
> [2] https://sourceforge.net/p/nbd/mailman/message/35081223/
>
> Signed-off-by: Eric Blake <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> block/nbd-client.c | 35 +++++++++++++++++++++++++++++++++++
> block/nbd-client.h | 2 ++
> block/nbd.c | 4 ++++
> 3 files changed, 41 insertions(+)
This patch went through so much rebasing that I failed to realize it was
originally written prior to adding commit 465fe887 with its
bs->supported_zero_flags. As such, the block layer eats flags and never
allows the server to perform FUA or do an unmap. I'll be posting a
followup for inclusion in 2.8, alongside my other pending patches (I
found it because of blkdebug enhancements that I'm writing, although the
blkdebug changes themselves are 2.9 material).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PULL 24/27] nbd: Implement NBD_CMD_WRITE_ZEROES on client,
Eric Blake <=