From: Stefan Hajnoczi <stefanha@redhat.com>
To: Alberto Faria <afaria@redhat.com>
Cc: virtio-comment@lists.linux.dev, mst@redhat.com, dverkamp@chromium.org
Subject: Re: [PATCH v4] virtio-blk: Add support for "Force Unit Access" writes
Date: Thu, 13 Nov 2025 10:55:57 -0500 [thread overview]
Message-ID: <20251113155557.GD189474@fedora> (raw)
In-Reply-To: <20251112055113.62207-1-afaria@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2227 bytes --]
On Wed, Nov 12, 2025 at 05:51:13AM +0000, Alberto Faria wrote:
> Add a VIRTIO_BLK_F_REQ_FLAGS feature bit converting the current
> `virtio_blk_req::reserved` field into a `flags` bit field, which can be
> used to modify the behavior of an entire request. The meaning of each
> bit depends on the request type.
>
> Define a single VIRTIO_BLK_REQ_FLAG_OUT_FUA bit as signaling that a
> VIRTIO_BLK_T_OUT request should be a "Force Unit Access" (FUA) write,
> i.e., should become stable once the request completes. FUA writes enable
> better performance compared to the alternative of waiting for a write to
> complete and subsequently submitting a flush.
>
> Also add a VIRTIO_BLK_F_REQ_FLAGS_OUT_FUA feature bit indicating device
> support for the aforementioned FUA bit.
>
> This approach allows for future expansion to other request-level flags
> and allows the same flag bit to be used for different purposes on
> different request types. The VIRTIO_BLK_F_REQ_FLAGS feature bit ensures
> compatibility with legacy devices/drivers that interpret the
> previously-`reserved` field as a priority indicator.
>
> Signed-off-by: Alberto Faria <afaria@redhat.com>
> ---
>
> v4:
> - Have the semantics of each request flag depend on the request type, as
> suggested by Stefan.
> - Some other smaller rewordings suggested by Stefan.
>
> v3:
> - Changed to a more future-proof approach somewhat similar to what was
> suggested by Stefan.
> - Included a brief rationale for the introduction of FUA write requests,
> as suggested by Michael.
>
> v2:
> - Redefine VIRTIO_BLK_T_OUT_FUA to 27 since 15 is already in use.
> - Clarify that the cache mode has no impact on VIRTIO_BLK_T_OUT_FUA
> semantics.
> - Allow drivers to negotiate VIRTIO_BLK_F_OUT_FUA even if they are
> incapable of sending VIRTIO_BLK_T_OUT_FUA commands.
>
> device-types/blk/description.tex | 43 +++++++++++++++++++++++++++++---
> 1 file changed, 39 insertions(+), 4 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Please see here on how to bring this issue to a vote:
https://github.com/oasis-tcs/virtio-spec/tree/master?tab=readme-ov-file#use-of-github-issues
Thanks,
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-11-13 15:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 5:51 [PATCH v4] virtio-blk: Add support for "Force Unit Access" writes Alberto Faria
2025-11-13 15:55 ` Stefan Hajnoczi [this message]
2026-01-21 3:33 ` Alberto Faria
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=20251113155557.GD189474@fedora \
--to=stefanha@redhat.com \
--cc=afaria@redhat.com \
--cc=dverkamp@chromium.org \
--cc=mst@redhat.com \
--cc=virtio-comment@lists.linux.dev \
/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