[sheepdog] [PATCH] sheep: return SD_RES_INVALID_PARMS when cache is not enabled

Liu Yuan namei.unix at gmail.com
Thu Dec 20 04:18:20 CET 2012


On 12/20/2012 02:37 AM, Liu Yuan wrote:
> From: Liu Yuan <tailai.ly at taobao.com>
> 
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
>  sheep/ops.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/sheep/ops.c b/sheep/ops.c
> index 476f712..f3e68a9 100644
> --- a/sheep/ops.c
> +++ b/sheep/ops.c
> @@ -674,9 +674,10 @@ static int local_get_snap_file(struct request *req)
>  	return ret;
>  }
>  
> +/* Return SD_RES_INVALID_PARMS to ask client not to send flush req again */
>  static int local_flush_vdi(struct request *req)
>  {
> -	int ret = SD_RES_SUCCESS;
> +	int ret = SD_RES_INVALID_PARMS;
>  
>  	if (is_object_cache_enabled()) {
>  		ret = object_cache_flush_vdi(req);
> 

Applied

Yuan



More information about the sheepdog mailing list