OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
To: andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 v3 0/2] drivers/vhost/blk: support VIRTIO_BLK_F_WRITE_ZEROES
Date: Tue, 17 Nov 2026 11:09:02 +0100	[thread overview]
Message-ID: <20261117100904.3071306-1-alexander.ivanov@virtuozzo.com> (raw)

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.

v3:
- patch 1, commit message: the hang needs vhost_task workers; the
  reason for the work item; dropped the VHOST_RESET_OWNER sentence.
- patch 2, commit message: the VMM paragraph says what a large
  max_write_zeroes_sectors costs and that our QEMU does not advertise
  the feature yet.

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
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

             reply	other threads:[~2026-11-17 10:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 10:09 Alexander Ivanov [this message]
2026-11-17 10:09 ` [Devel] [PATCH hci-8.1 v3 1/2] drivers/vhost/blk: fix a flush hang on requests completed after worker kill Alexander Ivanov
2026-11-17 10:14   ` no-reply
2026-11-17 10:09 ` [Devel] [PATCH hci-8.1 v3 2/2] drivers/vhost/blk: support VIRTIO_BLK_F_WRITE_ZEROES Alexander Ivanov
2026-11-17 10:18   ` no-reply
2026-11-17 11:32   ` Andrey Zhadchenko
2026-11-17 13:50   ` Konstantin Khorenko
2026-11-17 13:50 ` [Devel] [PATCH hci-8.1 v3 0/2] " Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261117100904.3071306-1-alexander.ivanov@virtuozzo.com \
    --to=alexander.ivanov@virtuozzo.com \
    --cc=andrey.zhadchenko@virtuozzo.com \
    --cc=devel@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox