From: MORITA Kazutaka <[email protected]>

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

Signed-off-by: MORITA Kazutaka <[email protected]>
Signed-off-by: Liu Yuan <[email protected]>
---
 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 1710522..6737efd 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.10.4

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to