From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, david@kernel.org, imammedo@redhat.com
Subject: Re: [PATCH] backends/hostmem: Factor out "property still settable" check
Date: Thu, 12 Nov 2026 12:06:08 +0000 [thread overview]
Message-ID: <avWrsMBE4BqODUtm@redhat.com> (raw)
In-Reply-To: <20261112115142.973035-1-armbru@redhat.com>
On Thu, Nov 12, 2026 at 12:51:42PM +0100, Markus Armbruster wrote:
> We check whether a property can still be set like this:
>
> if (host_memory_backend_mr_inited(backend)) {
> error_setg(errp, ...);
> return;
> }
>
> The actual error messages vary a bit. Most are like
>
> cannot change property 'PROP-NAME' of TYPE-NAME
>
> but we also have
>
> cannot change property value
>
> Factor out into host_memory_backend_settable() so we can instead use:
>
> if (!host_memory_backend_settable(backend, name, errp)) {
> return;
> }
>
> The error message is now always
>
> cannot change property 'PROP-NAME' of 'TYPE-NAME'
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> include/system/hostmem.h | 2 ++
> backends/hostmem-file.c | 24 ++++++------------------
> backends/hostmem-memfd.c | 3 +--
> backends/hostmem.c | 21 ++++++++++++++-------
> 4 files changed, 23 insertions(+), 27 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
prev parent reply other threads:[~2026-11-12 12:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 11:51 [PATCH] backends/hostmem: Factor out "property still settable" check Markus Armbruster
2026-11-12 12:06 ` Daniel P. Berrangé [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=avWrsMBE4BqODUtm@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=david@kernel.org \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.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 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.