OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>,
	andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1] drivers/vhost/blk: support VIRTIO_BLK_F_WRITE_ZEROES
Date: Mon, 2 Nov 2026 11:38:35 +0000	[thread overview]
Message-ID: <010701a19c0dd6a4-c85d3956-48d7-45a2-b75e-3bfc362a23c8-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261102113051.4190522-1-alexander.ivanov@virtuozzo.com>

> QEMU virtio-blk advertises WRITE_ZEROES, so a guest switched to
> vhost-blk may issue such requests and gets VIRTIO_BLK_S_UNSUPP.
> 
> Handle VIRTIO_BLK_T_WRITE_ZEROES with __blkdev_issue_zeroout(), which
> splits the range by the device limit and falls back to writing zero
> pages when the backend has no WRITE ZEROES support. The UNMAP flag
> maps to the absence of BLKDEV_ZERO_NOUNMAP. Only a single segment per
> request is accepted, as in QEMU, so the device config must report
> max_write_zeroes_seg = 1. The segment is taken from the device-readable
> part of the chain, where the virtio spec places it.
> 
> Complete a range not aligned to the logical block size and a request
> to a read-only backend with VIRTIO_BLK_S_IOERR, as QEMU does. The
> backend is read-only as for VIRTIO_BLK_T_OUT: the fd lacks FMODE_WRITE
> or the bdev is read-only. BLKROSET or set_disk_ro() may switch the bdev
> [ ... ]
> the limit has become zero instead of reporting VIRTIO_BLK_S_IOERR.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-141684
> Feature: vhost-blk: in-kernel accelerator for virtio-blk guests
> Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261102113051.4190522-1-alexander.ivanov@virtuozzo.com?part=1


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

      reply	other threads:[~2026-11-02 11:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 11:30 Alexander Ivanov
2026-11-02 11:38 ` no-reply [this message]

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=010701a19c0dd6a4-c85d3956-48d7-45a2-b75e-3bfc362a23c8-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=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