Eric Blake 169407e1f7 nbd: Allow unmap and fua during write zeroes
Commit fa778fff wired up support to send the NBD_CMD_WRITE_ZEROES,
but forgot to inform the block layer that FUA unmapping of zeroes is
supported.  Without BDRV_REQ_MAY_UNMAP listed as a supported flag,
the block layer will always insist on the NBD layer passing
NBD_CMD_FLAG_NO_HOLE, resulting in the server always allocating
things even when it was desired to let the server punch holes.
Similarly, failing to set BDRV_REQ_FUA means that the client may
send unnecessary NBD_CMD_FLUSH when it could have instead used the
NBD_CMD_FLAG_FUA bit.

CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1479413642-22463-2-git-send-email-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-11-22 23:26:51 +01:00
..
2016-10-07 13:34:07 +02:00
2016-10-07 13:34:07 +02:00
2016-11-14 22:47:34 -05: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-11-11 15:54:55 +01:00
2016-10-07 13:34:07 +02:00
2016-10-24 17:54:03 +02:00
2016-11-11 15:54:55 +01: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-11-11 15:56:22 +01:00
2016-11-01 07:55:57 -04:00
2016-11-14 22:47:34 -05:00
2016-11-14 22:47:34 -05:00