[sheepdog] [PATCH] collie: print VIDs after various vdi operations

Hitoshi Mitake mitake.hitoshi at gmail.com
Tue Jul 2 09:06:50 CEST 2013


At Tue, 2 Jul 2013 11:08:27 +0800,
Liu Yuan wrote:
> 
> On Tue, Jul 02, 2013 at 11:28:05AM +0900, Hitoshi Mitake wrote:
> > Priting VIDs after various operations by "collie vdi" is useful both
> > for human administrators and software which wraps collie.
> > 
> > Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> > ---
> >  collie/vdi.c |   43 ++++++++++++++++++++++++++++++++++++-------
> >  1 file changed, 36 insertions(+), 7 deletions(-)
> > 
> > diff --git a/collie/vdi.c b/collie/vdi.c
> > index 987be29..369315d 100644
> > --- a/collie/vdi.c
> > +++ b/collie/vdi.c
> > @@ -609,6 +609,12 @@ static int vdi_create(int argc, char **argv)
> >  	}
> >  	show_progress(idx * SD_DATA_OBJ_SIZE, inode->vdi_size);
> >  	ret = EXIT_SUCCESS;
> > +
> > +	if (raw_output)
> > +		printf("%x\n", vid);
> > +	else
> > +		printf("VDI ID of newly created VDI: %x\n", vid);
> 
> No, raw_output is supposed to be parsed by applicatoin. Your patch will simply
> break sheepfs.

Does this patch break sheepfs? This patch doesn't change any existing
command line options. And it seems that sheepfs only uses "list" of
"collie vdi", which is not changed by this patch.

> 
> I don't really see the point to printf message for these operations. If no error
> returns, it means success.

Sorry, the description is not enough. We want to know the changed VIDs
during these operations. This information is used by our internal
frontend software for sheepdog management. The frontend has its own
management table which contains VIDs and the above outputs are required
for updating it.

Thanks,
Hitoshi



More information about the sheepdog mailing list