[Sheepdog] [PATCH v4 6/6] remove oids from object list cache when deleting a vdi
MORITA Kazutaka
morita.kazutaka at gmail.com
Thu May 3 21:59:51 CEST 2012
At Thu, 3 May 2012 18:25:49 +0800,
levin li wrote:
>
> Cluster recovery may cause objects migrated from one node
> to another, but the object list cache doesn't change, when
> deleting an object we can not find the right node in whose
> cache the id stays, so we need to notify the deletion list
> to all the node to make them delete the specified object id
> from object list cache.
>
> Signed-off-by: levin li <xingke.lwp at taobao.com>
> ---
> include/sheep.h | 1 +
> sheep/object_list_cache.c | 17 ++++++++++++++
> sheep/ops.c | 17 ++++++++++++++
> sheep/sheep_priv.h | 1 +
> sheep/vdi.c | 57 ++++++++++++++++++++++++++++++++++++++++++---
> 5 files changed, 90 insertions(+), 3 deletions(-)
I don't like the idea to call process_main() in worker threads since
we shouldn't make the current thread model more complicated. In
addition, it is not good to take a long time in the cluster operations
even if it is in the worker threads because it blocks the succeeding
events (e.g. vdi creation) for a long time.
I guess it is better to create another work queue, and call
queue_work() in process_main() of SD_OP_NOTIFY_VDI_DEL like
start_deletion(). I wonder there would be other simpler and different
approaches, though.
Thanks,
Kazutaka
More information about the sheepdog
mailing list