[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 0/2] Add generic can_be_deleted to UserCreata
Re: [Qemu-devel] [PATCH v6 0/2] Add generic can_be_deleted to UserCreatableClass.
Mon, 30 Mar 2015 14:06:48 +0200
On Mon, 30 Mar 2015 16:36:27 +0800
Lin Ma <address@hidden> wrote:
Could you take it through your tree for 2.3, pls?
> 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.
Reviewed-by: Igor Mammedov <address@hidden>
> 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)
> Use specific caster instead of dynamic cast in user_creatable_can_be_deleted.
> Add function user_creatable_can_be_deleted to wrapper can_be_deleted method.
> Remove some unnecessary code.
> Move the callback to the correct place: UserCreatableClass.
> Move the backend callback implementation to hostmem.c.
> Make it generic, add the can_be_deleted callback to TypeInfo and TypeImpl.
> Implement the callback in hostmem-file.c and hostmem-ram.c.
> 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(+)