[sheepdog] [PATCH] sheep: fix confused comments of vdi_snapshot()

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Thu Apr 23 11:27:41 CEST 2015


At Thu, 23 Apr 2015 16:03:49 +0800,
Yu Yang wrote:
> 
> From: Yu Yang <yuyang at cmss.chinamobile.com>
> 
> fix the confused comments between snapid and vid for vdi_snapshot().
> 
> Signed-off-by: Yu Yang <yuyang at cmss.chinamobile.com>
> ---
>  sheep/vdi.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sheep/vdi.c b/sheep/vdi.c
> index 63e578d..b35a763 100644
> --- a/sheep/vdi.c
> +++ b/sheep/vdi.c
> @@ -1572,8 +1572,8 @@ int vdi_create(const struct vdi_iocb *iocb, uint32_t *new_vid)
>   * 2. rollback create (base_vid != current_vid)
>   *
>   * This function expects SUCCESS returned from vdi_lookup().  Both rollback and
> - * snap create started with current working VDI's snap_id + 1. Working VDI
> - * always has the highest snapid.
> + * snap creation starts with current working VDI's vid + 1. Working VDI
> + * always has the highest vid and its snapid is 0.

Sorry, I missed to point a possibility of vid overflow. Working VDI doesn't
have the highest VID always.

And the snapid of working VDI is always highest. It is simply incremented.

Could you fix them?

Thanks,
Hitoshi

>   */
>  int vdi_snapshot(const struct vdi_iocb *iocb, uint32_t *new_vid)
>  {
> -- 
> 1.7.9.5
> 
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/sheepdog



More information about the sheepdog mailing list