From: no-reply@sashiko.virtuozzo.com
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>,
andrey.zhadchenko@virtuozzo.com
Cc: andrey.drobyshev@virtuozzo.com, svt-core@virtuozzo.com
Subject: Re: [PATCH hci-8.2 v2] vhost-blk: advertise write zeroes with the backend limit
Date: Fri, 20 Nov 2026 13:26:43 +0000 [thread overview]
Message-ID: <010701a1f9234f31-01fd5beb-7bae-4626-a5c9-a3351ad2aa4d-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261120132317.3867152-1-alexander.ivanov@virtuozzo.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] vhost-blk: write_zeroes_may_unmap=1 advertised without
justification
--
commit e9ba7478b40c6be915b18d378891abd29c85cbb5
Author: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
vhost-blk: advertise write zeroes with the backend limit
When the write-zeroes property is on, this reads write_zeroes_max_bytes of a writable backend from sysfs. It advertises that value as max_write_zeroes_sectors, capped to what one bio can carry. The feature is not offered when the backend reports no limit, the limit cannot be read, or the backend is read-only.
> diff --git a/hw/block/vhost-blk.c b/hw/block/vhost-blk.c
> index 8ecb6a441e434..3e5150db4a879 100644
> --- a/hw/block/vhost-blk.c
> +++ b/hw/block/vhost-blk.c
[ ... ]
> @@ -772,6 +809,12 @@ static void vhost_blk_update_config(VirtIODevice *vdev, uint8_t *config)
> blkcfg.physical_block_exp = get_physical_block_exp(conf);
> blkcfg.alignment_offset = 0;
> virtio_stw_p(vdev, &blkcfg.num_queues, s->conf.num_queues);
> + if (s->max_write_zeroes_sectors) {
> + virtio_stl_p(vdev, &blkcfg.max_write_zeroes_sectors,
> + s->max_write_zeroes_sectors);
> + blkcfg.write_zeroes_may_unmap = 1;
> + virtio_stl_p(vdev, &blkcfg.max_write_zeroes_seg, 1);
> + }
[Severity: Low]
This isn't a bug, but the commit message does not mention write_zeroes_may_unmap or max_write_zeroes_seg. Does the kernel vhost-blk write-zeroes path permit unmapping, so that always setting write_zeroes_may_unmap = 1 is correct? The message explains the single bio per request, which motivates max_write_zeroes_seg = 1. It would help to state both choices and the reason for each.
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261120132317.3867152-1-alexander.ivanov@virtuozzo.com?part=1
next prev parent reply other threads:[~2026-11-20 13:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 13:23 Alexander Ivanov
2026-11-20 13:26 ` no-reply [this message]
2026-11-20 13:34 ` Alexander Ivanov
2026-11-23 16:33 ` Andrey Drobyshev
2026-11-24 13:32 ` Alexander Ivanov
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=010701a1f9234f31-01fd5beb-7bae-4626-a5c9-a3351ad2aa4d-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=alexander.ivanov@virtuozzo.com \
--cc=andrey.drobyshev@virtuozzo.com \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=svt-core@virtuozzo.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.