[sheepdog] [PATCH] sheep: don't recycle VDI ID
Liu Yuan
namei.unix at gmail.com
Fri Jun 6 04:22:54 CEST 2014
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.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
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
Applied thanks
Yuan
More information about the sheepdog
mailing list