nbd: Implement client use of NBD FAST_ZERO
commitf061656cc355161f9984237298c45762ce5187d3
authorEric Blake <eblake@redhat.com>
Fri, 23 Aug 2019 14:37:24 +0000 (23 09:37 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 5 Sep 2019 21:03:26 +0000 (5 16:03 -0500)
tree7d240be86555e9b9cb558af1e7442febed69a424
parent0a4795455ceeebdca999a60583dd42434f2ec0d1
nbd: Implement client use of NBD FAST_ZERO

The client side is fairly straightforward: if the server advertised
fast zero support, then we can map that to BDRV_REQ_NO_FALLBACK
support.  A server that advertises FAST_ZERO but not WRITE_ZEROES
is technically broken, but we can ignore that situation as it does
not change our behavior.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190823143726.27062-4-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
block/nbd.c