[sheepdog] [PATCH v2 2/9] sheep: add cmd argument -W to specify a max cache size

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Jul 26 02:09:01 CEST 2012


At Wed, 25 Jul 2012 20:15:18 +0800,
levin li wrote:
> 
> From: levin li <xingke.lwp at taobao.com>
> 
> 
> Signed-off-by: levin li <xingke.lwp at taobao.com>
> ---
>  sheep/sheep.c      |   16 +++++++++++++++-
>  sheep/sheep_priv.h |    2 ++
>  2 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/sheep/sheep.c b/sheep/sheep.c
> index 380a129..8b78669 100644
> --- a/sheep/sheep.c
> +++ b/sheep/sheep.c
> @@ -48,12 +48,13 @@ static struct option const long_options[] = {
>  	{"port", required_argument, NULL, 'p'},
>  	{"vnodes", required_argument, NULL, 'v'},
>  	{"enable-cache", no_argument, NULL, 'w'},
> +	{"cache-size", optional_argument, NULL, 'W'},

If '-w' and '-W' are always used at the same time, how about making
'-w' optional_argument?  For example, to set the max cache size to
100M,

 $ sheep -w 100 -d /store


Thanks,

Kazutaka



More information about the sheepdog mailing list