[lxc-devel] [PATCH] move bdev_specs struct into lxccontainer.h to allow API users to use it

Serge Hallyn serge.hallyn at ubuntu.com
Wed May 21 13:45:38 UTC 2014


Quoting S.Çağlar Onur (caglar at 10ur.org):
> Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>

Should be ok since bdev.h #includes lxccontainer.h

However, we should probably also version the struct then.

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/bdev.h         | 17 -----------------
>  src/lxc/lxccontainer.h | 18 ++++++++++++++++++
>  2 files changed, 18 insertions(+), 17 deletions(-)
> 
> diff --git a/src/lxc/bdev.h b/src/lxc/bdev.h
> index 0893c11..9d03b10 100644
> --- a/src/lxc/bdev.h
> +++ b/src/lxc/bdev.h
> @@ -33,23 +33,6 @@
>  
>  struct bdev;
>  
> -/*
> - * specifications for how to create a new backing store
> - */
> -struct bdev_specs {
> -	char *fstype;
> -	uint64_t fssize;  // fs size in bytes
> -	struct {
> -		char *zfsroot;
> -	} zfs;
> -	struct {
> -		char *vg;
> -		char *lv;
> -		char *thinpool; // lvm thin pool to use, if any
> -	} lvm;
> -	char *dir;
> -};
> -
>  struct bdev_ops {
>  	/* detect whether path is of this bdev type */
>  	int (*detect)(const char *path);
> diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h
> index ba15ab7..1d0628a 100644
> --- a/src/lxc/lxccontainer.h
> +++ b/src/lxc/lxccontainer.h
> @@ -758,6 +758,24 @@ struct lxc_snapshot {
>  	void (*free)(struct lxc_snapshot *s);
>  };
>  
> +
> +/*!
> + * \brief Specifications for how to create a new backing store
> + */
> +struct bdev_specs {
> +    char *fstype; /*!< Filesystem type */
> +    uint64_t fssize;  /*!< Filesystem size in bytes */
> +    struct {
> +        char *zfsroot; /*!< ZFS root path */
> +    } zfs;
> +    struct {
> +        char *vg; /*!< LVM Volume Group name */
> +        char *lv; /*!< LVM Logical Volume name */
> +        char *thinpool; /*!< LVM thin pool to use, if any */
> +    } lvm;
> +    char *dir; /*!< Directory path */
> +};
> +
>  /*!
>   * \brief Create a new container.
>   *
> -- 
> 1.9.1
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list