From: Paolo Bonzini <pbonzini@redhat.com>
To: Lin Ma <lma@suse.com>,
imammedo@redhat.com, afaerber@suse.de,
peter.crosthwaite@xilinx.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v6 0/2] Add generic can_be_deleted to UserCreatableClass.
Date: Mon, 30 Mar 2015 10:50:13 +0200 [thread overview]
Message-ID: <55190E45.1090709@redhat.com> (raw)
In-Reply-To: <1427704589-7688-1-git-send-email-lma@suse.com>
On 30/03/2015 10:36, Lin Ma wrote:
> The patchset adds a generic can_be_deleted callback to UserCreatableClass.
> It prevents removing a usercreatable object if the callback returns false.
>
> Backends could implement the callback if it shoudn't be removed while it's
> in use.
>
> Thank Peter Crosthwaite, Paolo Bonzini, Andreas Färber and Igor Mammedov for
> helping review.
>
>
> ChangeLog:
> V6:
> Change prototype of user_creatable_can_be_deleted.
> from bool user_creatable_can_be_deleted(Object *obj, Error **errp)
> to bool user_creatable_can_be_deleted(UserCreatable *uc, Error **errp)
>
> V5:
> Use specific caster instead of dynamic cast in user_creatable_can_be_deleted.
>
> V4:
> Add function user_creatable_can_be_deleted to wrapper can_be_deleted method.
> Remove some unnecessary code.
>
> V3:
> Move the callback to the correct place: UserCreatableClass.
> Move the backend callback implementation to hostmem.c.
>
> V2:
> Make it generic, add the can_be_deleted callback to TypeInfo and TypeImpl.
> Implement the callback in hostmem-file.c and hostmem-ram.c.
>
> V1:
> Initial version, hard coded in object_del to prevent removing an in-use
> host memory backend.
>
>
> Lin Ma (2):
> qom: Add can_be_deleted callback to UserCreatableClass
> hostmem: Prevent removing an in-use memory backend
>
> backends/hostmem.c | 14 ++++++++++++++
> include/qom/object_interfaces.h | 13 +++++++++++++
> qmp.c | 5 +++++
> qom/object_interfaces.c | 12 ++++++++++++
> 4 files changed, 44 insertions(+)
>
Thanks, looks good for 2.3.
Paolo
next prev parent reply other threads:[~2015-03-30 8:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 8:36 [Qemu-devel] [PATCH v6 0/2] Add generic can_be_deleted to UserCreatableClass Lin Ma
2015-03-30 8:36 ` [Qemu-devel] [PATCH v6 1/2] qom: Add can_be_deleted callback " Lin Ma
2015-03-31 10:48 ` Andreas Färber
2015-03-31 10:51 ` Paolo Bonzini
2015-03-30 8:36 ` [Qemu-devel] [PATCH v6 2/2] hostmem: Prevent removing an in-use memory backend Lin Ma
2015-03-30 8:50 ` Paolo Bonzini [this message]
2015-03-30 12:06 ` [Qemu-devel] [PATCH v6 0/2] Add generic can_be_deleted to UserCreatableClass Igor Mammedov
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=55190E45.1090709@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=imammedo@redhat.com \
--cc=lma@suse.com \
--cc=peter.crosthwaite@xilinx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).