[sheepdog] [PATCH] sheep: don't recycle VDI ID
Hitoshi Mitake
mitake.hitoshi at gmail.com
Sun Jun 1 16:23:18 CEST 2014
Recycling VDI IDs of deleted VDIs is a completely wrong idea. It
breaks relations between inode objects and data objects. For example,
it can cause a problem of corrupting cloned VDIs (see related
issue). This patch forbids the recycling.
Related issue:
https://bugs.launchpad.net/sheepdog-project/+bug/1317755
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
sheep/vdi.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/sheep/vdi.c b/sheep/vdi.c
index baac2f9..3e60da3 100644
--- a/sheep/vdi.c
+++ b/sheep/vdi.c
@@ -556,13 +556,6 @@ static int fill_vdi_info_range(uint32_t left, uint32_t right,
if (ret != SD_RES_SUCCESS)
goto out;
- if (vdi_is_deleted(inode)) {
- /* Recycle the deleted inode for fresh vdi create */
- if (!iocb->create_snapshot)
- info->free_bit = i;
- continue;
- }
-
if (!strncmp(inode->name, name, sizeof(inode->name))) {
sd_debug("%s = %s, %u = %u", iocb->tag, inode->tag,
iocb->snapid, inode->snap_id);
--
1.9.1
More information about the sheepdog
mailing list