[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] Re: [PATCH 1/6] Add --dataalignmentoffset to pvcreate to pad aligned data area



On Wed, Jul 22 2009 at 10:53pm -0400,
Mike Snitzer <snitzer redhat com> wrote:

> diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
> index d8e03f0..32af70b 100644
> --- a/lib/format_text/format-text.c
> +++ b/lib/format_text/format-text.c
> @@ -1382,6 +1382,8 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
>  			adjustment = pv->pe_start % pv->pe_align;
>  			if (adjustment)
>  				pv->pe_start += pv->pe_align - adjustment;
> +			if (pv->pe_align_offset)
> +				pv->pe_start += pv->pe_align_offset;
>  		}
>  	}
>  	if (!add_da

My next post of this patch series will add a negative check that makes
sure the PV's data area is not beyond the end of the device.

Mike


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]