Eric Blake fa778fffdf nbd: Implement NBD_CMD_WRITE_ZEROES on client
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 <eblake@redhat.com>
Message-Id: <1476469998-28592-17-git-send-email-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-11-02 09:28:56 +01:00
..
2016-10-07 13:34:07 +02:00
2016-10-07 13:34:07 +02:00
2016-10-07 13:34:07 +02:00
2016-10-07 14:14:06 +02:00
2016-10-07 14:14:06 +02:00
2016-10-07 14:14:06 +02:00
2016-10-07 13:34:07 +02:00
2016-10-31 16:51:14 +01:00
2016-10-31 16:52:39 +01:00
2016-10-07 13:34:07 +02:00
2016-10-24 17:54:03 +02:00
2016-10-24 17:54:03 +02:00
2016-10-28 21:50:18 +08:00
2016-10-28 21:50:18 +08:00
2016-10-07 13:34:07 +02:00
2016-10-31 16:52:39 +01:00
2016-10-27 19:05:23 +02:00
2016-10-23 16:10:59 +02:00
2016-10-31 16:49:13 +01:00
2016-10-27 19:05:22 +02:00
2016-09-23 11:42:52 +08:00
2016-09-23 11:42:52 +08:00
2016-09-23 11:42:52 +08:00
2016-09-05 19:06:48 +02:00
2016-09-23 11:42:52 +08:00