[sheepdog] [PATCH v1 1/5] sheep: add new option for configure

Liu Yuan namei.unix at gmail.com
Sun May 4 09:41:36 CEST 2014


On Tue, Apr 29, 2014 at 10:53:41AM +0800, Robin Dong wrote:
> From: Robin Dong <sanbai at taobao.com>
> 
> Add new configure option '--enable-diskvnodes' so we can
> start sheep cluster by using disk as vnodes.
> 
> Signed-off-by: Robin Dong <sanbai at taobao.com>
> ---
>  configure.ac             | 10 ++++++++++
>  include/internal_proto.h |  1 +
>  sheep/config.c           |  9 ++++++++-
>  sheep/sheep.c            |  6 ++++++
>  4 files changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index a3abb7b..7e6691f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -255,6 +255,12 @@ AC_ARG_ENABLE([nfs],
>  	[ enable_nfs="no" ],)
>  AM_CONDITIONAL(BUILD_NFS, test x$enable_nfs = xyes)
>  
> +AC_ARG_ENABLE([diskvnodes],
> +	[ --enable-diskvnodes : enable disk as vnodes (default no) ],,
> +	[ enable_diskvnodes="no" ],)
> +AM_CONDITIONAL(BUILD_DISKVNODES, test x$enable_diskvnodes = xyes)
> +
> +
>  CP=cp
>  OS_LDL="-ldl"
>  case "$host_os" in
> @@ -367,6 +373,10 @@ if test "x${enable_nfs}" = xyes; then
>  	PACKAGE_FEATURES="$PACKAGE_FEATURES nfs"
>  fi
>  
> +if test "x${enable_diskvnodes}" = xyes; then
> +	AC_DEFINE_UNQUOTED(HAVE_DISKVNODES, 1, [have diskvnodes])
> +fi
> +
>  # extra warnings
>  EXTRA_WARNINGS=""
>  
> diff --git a/include/internal_proto.h b/include/internal_proto.h
> index 0eb7227..7db3769 100644
> --- a/include/internal_proto.h
> +++ b/include/internal_proto.h
> @@ -172,6 +172,7 @@ struct cluster_info {
>  	uint8_t nr_copies;
>  	uint8_t copy_policy;
>  	enum sd_status status : 8;
> +	uint8_t disk_as_vnode;
>  	uint32_t __pad;

why not use 8 bytes in __pad?

Thanks
Yuan



More information about the sheepdog mailing list