[lvm-devel] [PATCH 3/11] Replace implementation of vg_check_status with a call to _vg_check_status.

Alasdair G Kergon agk at redhat.com
Mon Jan 12 22:08:17 UTC 2009


On Mon, Jan 12, 2009 at 03:07:58PM +0100, Peter Rockai wrote:
>   * Replace implementation of vg_check_status with a call to _vg_check_status.

> -int vg_check_status(const struct volume_group *vg, uint32_t status)
> +static uint32_t _vg_check_status(const struct volume_group *vg, uint32_t status)

typedef for the return value?

>  {
> +	uint32_t ret = 0;

This is more than a simple yes/no return value, call it the same as whatever
you decide to call it elsewhere e.g. 'failure'.

>  	if ((status & CLUSTERED) &&
>  	    (vg_is_clustered(vg)) && !locking_is_clustered() &&
>  	    !lockingfailed()) {
>  		log_error("Skipping clustered volume group %s", vg->name);
> -		return 0;
> +		ret |= FAILED_CLUSTERED;
>  	}

If we're skipping the VG, why do we want to perform the other checks now?

Alasdair
-- 
agk at redhat.com




More information about the lvm-devel mailing list