[lvm-devel] [PATCH 36/38] Allow 'all' and 'unmanaged' values for --vgmetadatacopies.

Alasdair G Kergon agk at redhat.com
Mon Jun 28 13:34:47 UTC 2010


On Fri, Jun 25, 2010 at 10:53:07PM -0400, Dave Wysochanski wrote:
> +++ b/lib/metadata/metadata-exported.h

> +#define VGMETADATACOPIES_ALL UINT32_MAX
> +#define VGMETADATACOPIES_UNMANAGED 0

Exported.


> @@ -1075,6 +1075,14 @@ static int _vg_metadata_balance(struct volume_group *vg)
>  			count = vg->mda_copies - mda_copies;
>  		ret = _vg_unignore_mdas(vg, count);
>  	}
> +	/*
> +	 * 'All' is really a special cmdline value that means 2 things:
> +	 * 1. clear all ignore bits in all mdas in this vg
> +	 * 2. set the "unmanaged" policy going forward for metadata balancing
> +	 */
> +	if (vg->mda_copies == VGMETADATACOPIES_ALL)
> +		vg->mda_copies = VGMETADATACOPIES_UNMANAGED;

Can we be clear that _ALL will never hit disk?
There are no paths that reach disk bypassing that if test?

Alasdair




More information about the lvm-devel mailing list