On Sun, Jun 01, 2014 at 11:23:18PM +0900, Hitoshi Mitake wrote: > 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.hito...@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);
This looks a valid problem to me, but this is very old policy introduced by Kazutaka, so let's hear his voice first. Thanks Yuan -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog