[lvm-devel] [PATCH 4/5] lvm2app: Move core lv re-size code (v2)

Zdenek Kabelac zkabelac at redhat.com
Thu Mar 14 14:17:19 UTC 2013


Dne 13.3.2013 23:13, Tony Asleson napsal(a):
> Moved to allow use from command line and for library use.
>
> Signed-off-by: Tony Asleson <tasleson at redhat.com>
> ---
>   lib/metadata/lv_manip.c          | 734 +++++++++++++++++++++++++++++++++++++
>   lib/metadata/metadata-exported.h |  46 +++
>   tools/lvresize.c                 | 771 ---------------------------------------
>   3 files changed, 780 insertions(+), 771 deletions(-)
>

> diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h
> index c2728d5..a792fd2 100644
> --- a/lib/metadata/metadata-exported.h
> +++ b/lib/metadata/metadata-exported.h
> @@ -419,6 +419,49 @@ struct pvcreate_params {
>   	struct pvcreate_restorable_params rp;
>   };
>
> +struct lvresize_params {
> +	const char *vg_name;
> +	const char *lv_name;
> +
> +	uint32_t stripes;
> +	uint32_t stripe_size;
> +	uint32_t mirrors;
> +


Here we should think about - whether there should be one
generic  '_params'  object with subsection (?unions?)
for various operations - since there is a lot of common
options between  lvcreate/lvconvert/lvresize....

lvm2api then might create access(set/get) methods to prepare this object
and pass this handle into more generic function.

Zdenek




More information about the lvm-devel mailing list