[lvm-devel] [PATCH 18/23] Return PERCENT_INVALID for error case

Alasdair G Kergon agk at redhat.com
Wed Jan 5 02:33:58 UTC 2011


On Tue, Dec 21, 2010 at 06:47:30PM +0100, Milan Broz wrote:
> On 12/21/2010 04:41 PM, Zdenek Kabelac wrote:
> > +	if (!lv_mirror_percent(lv->vg->cmd, (struct logical_volume *) lv,
> > +			   0, &perc, NULL))
> > +		perc = PERCENT_INVALID;
> > +	return perc;
> 
> dunno, these functions returns 0 if (!activation()) and if lv is not activated
>  is the PERCENT_INVALID (-1) correct value here?

Seems a reasonable use of this.

Ack (current code is definitely wrong) pending a review of whether all
the code is making best use of the values of the new percent type.
 
Alasdair




More information about the lvm-devel mailing list