Add VIRTIO_BLK_F_WRITE_ZEROES support to vhost-blk for parity with
virtio-blk.

Patch 1 releases requests completed after the vhost worker was killed,
which otherwise hang vhost_blk_flush() on release. Patch 2 handles
VIRTIO_BLK_T_WRITE_ZEROES.

v2:
- patch 1: new.
- patch 2: shorten the commit message, state parity with virtio-blk
  as the reason and what the VMM must advertise.
- patch 2: issue chunks of at most 16 WRITE ZEROES bios and 1 GiB,
  try them with BLKDEV_ZERO_NOFALLBACK and fall back to 4 MiB chunks
  of zero pages.
- patch 2: complete the request with VIRTIO_BLK_S_UNSUPP when
  VIRTIO_BLK_F_WRITE_ZEROES was not negotiated.

https://virtuozzo.atlassian.net/browse/VSTOR-141684

Alexander Ivanov (2):
  drivers/vhost/blk: fix a flush hang on requests completed after worker
    kill
  drivers/vhost/blk: support VIRTIO_BLK_F_WRITE_ZEROES

 drivers/vhost/blk.c | 214 ++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 209 insertions(+), 5 deletions(-)

-- 
2.53.0

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to