From: Lin Ma <lma@suse.com>
To: imammedo@redhat.com, afaerber@suse.de,
peter.crosthwaite@xilinx.com, pbonzini@redhat.com
Cc: qemu-devel@nongnu.org, Lin Ma <lma@suse.com>
Subject: [Qemu-devel] [PATCH v3 0/2] Add generic can_be_deleted to UserCreatableClass.
Date: Fri, 27 Mar 2015 01:07:04 +0800 [thread overview]
Message-ID: <1427389626-23487-1-git-send-email-lma@suse.com> (raw)
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:
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 object
backends/hostmem.c | 14 ++++++++++++++
include/qom/object_interfaces.h | 3 +++
qmp.c | 13 +++++++++++++
3 files changed, 30 insertions(+)
--
2.1.4
next reply other threads:[~2015-03-26 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 17:07 Lin Ma [this message]
2015-03-26 17:07 ` [Qemu-devel] [PATCH v3 1/2] qom: Add can_be_deleted callback to UserCreatableClass Lin Ma
2015-03-26 20:34 ` Paolo Bonzini
2015-03-26 17:07 ` [Qemu-devel] [PATCH v3 2/2] hostmem: Prevent removing an in-use memory backend object Lin Ma
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=1427389626-23487-1-git-send-email-lma@suse.com \
--to=lma@suse.com \
--cc=afaerber@suse.de \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.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).