[sheepdog] [PATCH] sheep: don't remove vdi object from object list cache

MORITA Kazutaka morita.kazutaka at gmail.com
Thu Aug 22 03:27:49 CEST 2013


From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>

We don't remove a vdi object from the underlying store even after the
vdi is deleted.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/object_list_cache.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sheep/object_list_cache.c b/sheep/object_list_cache.c
index 831edb5..357784e 100644
--- a/sheep/object_list_cache.c
+++ b/sheep/object_list_cache.c
@@ -184,6 +184,11 @@ static void objlist_deletion_work(struct work *work)
 		entry_vid = oid_to_vid(entry->oid);
 		if (entry_vid != vid)
 			continue;
+
+		/* VDI objects cannot be removed even after we delete images. */
+		if (is_vdi_obj(entry->oid))
+			continue;
+
 		sd_debug("delete object entry %" PRIx64, entry->oid);
 		list_del(&entry->list);
 		rb_erase(&entry->node, &obj_list_cache.root);
-- 
1.7.9.5




More information about the sheepdog mailing list