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 v3 2/2] drivers/vhost/blk: support VIRTIO_BLK_F_WRITE_ZEROES
Date: Tue, 17 Nov 2026 10:18:59 +0000 [thread overview]
Message-ID: <010701a1e9045bfc-821eb04c-5726-4f51-8a25-8ce6f66fca90-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261117100904.3071306-3-alexander.ivanov@virtuozzo.com>
> Handle VIRTIO_BLK_T_WRITE_ZEROES for parity with virtio-blk. The range
> is zeroed with __blkdev_issue_zeroout(), which uses WRITE ZEROES of the
> backend or falls back to writing zero pages. The UNMAP flag maps to
> the absence of BLKDEV_ZERO_NOUNMAP. The range is issued in chunks of
> at most 16 WRITE ZEROES bios and 1 GiB, or 4 MiB ones when zero pages
> are written, since each chunk is built in the vhost worker.
>
> The VMM must advertise blk_size equal to the backend logical block
> size, max_write_zeroes_sectors aligned to it and at most 8388607, and
> max_write_zeroes_seg = 1. A request is zeroed one chunk at a time and
> holds vhost_blk_flush() until its last chunk, so a small
> max_write_zeroes_sectors keeps vhost ioctls short on backends without
> WRITE ZEROES. Our QEMU does not advertise the feature yet.
>
> The guest gets VIRTIO_BLK_S_UNSUPP when VIRTIO_BLK_F_WRITE_ZEROES was
> not negotiated, for a payload other than exactly one segment or an
> unknown flag, and VIRTIO_BLK_S_IOERR for a read-only backend and for a
> range that is unaligned, beyond the capacity or above 8388607 sectors.
>
> 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.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261117100904.3071306-1-alexander.ivanov@virtuozzo.com?part=2
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-17 10:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 10:09 [Devel] [PATCH hci-8.1 v3 0/2] " Alexander Ivanov
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 [this message]
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=010701a1e9045bfc-821eb04c-5726-4f51-8a25-8ce6f66fca90-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