[sheepdog] [PATCH] sheep: fix confused comments of vdi_snapshot()
Yu Yang
justyuyang at foxmail.com
Thu Apr 23 13:15:00 CEST 2015
> -----Original Message-----
> From: Hitoshi Mitake [mailto:mitake.hitoshi at gmail.com] On Behalf Of Hitoshi
> Mitake
> Sent: Thursday, April 23, 2015 5:28 PM
> To: Yu Yang
> Cc: sheepdog at lists.wpkg.org
> Subject: Re: [sheepdog] [PATCH] sheep: fix confused comments of
> vdi_snapshot()
>
> 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
>
I know when vid is overflow it's not the highest,
but you said the snapid of working VDI is always the highest ?
I find it is always ZERO, or I misunderstand of working VDI which can be
read/write ?
Thanks
Yang
> > */
> > 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