qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel]  [PATCH v3 0/2] Add generic can_be_deleted to UserCreatableClass.
@ 2015-03-26 17:07 Lin Ma
  2015-03-26 17:07 ` [Qemu-devel] [PATCH v3 1/2] qom: Add can_be_deleted callback " Lin Ma
  2015-03-26 17:07 ` [Qemu-devel] [PATCH v3 2/2] hostmem: Prevent removing an in-use memory backend object Lin Ma
  0 siblings, 2 replies; 4+ messages in thread
From: Lin Ma @ 2015-03-26 17:07 UTC (permalink / raw)
  To: imammedo, afaerber, peter.crosthwaite, pbonzini; +Cc: qemu-devel, Lin Ma

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-26 20:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 17:07 [Qemu-devel] [PATCH v3 0/2] Add generic can_be_deleted to UserCreatableClass Lin Ma
2015-03-26 17:07 ` [Qemu-devel] [PATCH v3 1/2] qom: Add can_be_deleted callback " 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

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).