From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, stefanha@redhat.com,
Peter Krempa <pkrempa@redhat.com>
Subject: Re: [PATCH] file-posix: Fix loss of QAPI feature 'dynamic-auto-read-only'
Date: Tue, 24 Nov 2026 13:30:05 -0600 [thread overview]
Message-ID: <awXlbpIs9QdJZfIC@redhat.com> (raw)
In-Reply-To: <20261124152218.2562390-1-armbru@redhat.com>
On Tue, Nov 24, 2026 at 04:22:18PM +0100, Markus Armbruster wrote:
> Recent commit 691094b7091b added a variant member to BlockdevOptions
> branch 'host-device' by changing the branch type to new struct type
> BlockdevOptionsHostDevice that has the old branch type
> BlockdevOptionsFile as base. This is a perfectly reasonable thing to
> do. However, since a type only inherits its base's members, and not
> its features or conditions, this lost BlockdevOptionsFile's feature
> 'dynamic-auto-read-only'.
>
> Considering we are in deep freeze, fix the regression the stupidest
> and safest way possible: copy the feature from BlockdevOptionsFile to
> BlockdevOptionsHostDevice.
>
> Reported-by: Peter Krempa <pkrempa@redhat.com>
> Fixes: 691094b7091b ("file-posix: Add 'accept-read-only-device' option")
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> qapi/block-core.json | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
While we may do a more complete change in 12.0, I agree that this
patch is worth having in 11.2.
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 23c5787d99b..7aa4fa2df93 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -3403,11 +3403,23 @@
> # writable. If it is true, this check is skipped. (since: 11.2,
> # default: false)
> #
> +# Features:
> +#
> +# @dynamic-auto-read-only: If present, enabled auto-read-only means
> +# that the driver will open the image read-only at first,
> +# dynamically reopen the image file read-write when the first
> +# writer is attached to the node and reopen read-only when the
> +# last writer is detached. This allows giving QEMU write
> +# permissions only on demand when an operation actually needs
> +# write access.
> +#
> # Since: 11.2
> ##
> { 'struct': 'BlockdevOptionsHostDevice',
> 'base': 'BlockdevOptionsFile',
> - 'data': { '*accept-read-only-device': 'bool' } }
> + 'data': { '*accept-read-only-device': 'bool' },
> + 'features': [ { 'name': 'dynamic-auto-read-only',
> + 'if': 'CONFIG_POSIX' } ] }
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
next prev parent reply other threads:[~2026-11-24 19:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 15:22 [PATCH] file-posix: Fix loss of QAPI feature 'dynamic-auto-read-only' Markus Armbruster
2026-11-24 19:30 ` Eric Blake [this message]
2026-11-27 9:59 ` Markus Armbruster
2026-11-27 10:07 ` Kevin Wolf
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=awXlbpIs9QdJZfIC@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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.