All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>,
	andrey.zhadchenko@virtuozzo.com
Cc: svt-core@virtuozzo.com
Subject: Re: [PATCH hci-8.2 v5] vhost-blk: advertise write zeroes on a backend that supports it
Date: Thu, 26 Nov 2026 13:49:24 +0200	[thread overview]
Message-ID: <3b9ffb11-d9f1-4daa-840c-cfc3a5624896@virtuozzo.com> (raw)
In-Reply-To: <20261125170822.827369-1-alexander.ivanov@virtuozzo.com>

On 11/25/26 7:08 PM, Alexander Ivanov wrote:
> vhost-blk in the kernel now handles VIRTIO_BLK_T_WRITE_ZEROES. It sends
> each request to the backend as one WRITE ZEROES bio, which the block
> layer splits by the limit of the backend, and answers
> VIRTIO_BLK_S_UNSUPP when the backend has no WRITE ZEROES support. So the
> range of a request is bounded only by the size of one bio.
> 
> With the write-zeroes property on, read write_zeroes_max_bytes of a
> writable backend from sysfs once at startup and use it only to tell
> whether the backend supports WRITE ZEROES. Then advertise the constant
> VHOST_BLK_MAX_WRITE_ZEROES_SECTORS: a power of two that fits in one bio
> and is aligned to any logical block size, so the guest never sends a
> range the kernel rejects. The limit itself can change later on a dm
> table reload, and a constant keeps the config the same on both sides of
> a migration. A partition has no queue/ directory of its own, so read the
> limit of the whole disk, whose queue it shares. Do not offer
> VIRTIO_BLK_F_WRITE_ZEROES when the backend reports no limit, the limit
> cannot be read, or the backend is opened read-only.
> 
> The property stays off by default. A kernel without write zeroes
> support in vhost-blk does not offer the feature, so it is not
> negotiated there.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-141684
> 
> Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
> [...]

Reviewed-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>

      parent reply	other threads:[~2026-11-26 11:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 17:08 Alexander Ivanov
2026-11-26 11:33 ` Andrey Zhadchenko
2026-11-26 11:49 ` Andrey Drobyshev [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=3b9ffb11-d9f1-4daa-840c-cfc3a5624896@virtuozzo.com \
    --to=andrey.drobyshev@virtuozzo.com \
    --cc=alexander.ivanov@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.