[sheepdog] [PATCH] sheep: return SD_RES_VDI_LOCKED in a case of failed lock

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Mon Aug 11 07:45:17 CEST 2014


At Mon, 11 Aug 2014 11:45:19 +0900,
Hitoshi Mitake wrote:
> 
> Returning SD_RES_VDI_NOT_LOCKED in a case of failed lock can produce
> a confusing error message.
> 
> Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> ---
>  sheep/ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied.

Thanks,
Hitoshi

> 
> diff --git a/sheep/ops.c b/sheep/ops.c
> index 9688991..7247b83 100644
> --- a/sheep/ops.c
> +++ b/sheep/ops.c
> @@ -1348,7 +1348,7 @@ static int cluster_lock_vdi_main(const struct sd_req *req, struct sd_rsp *rsp,
>  
>  	if (!vdi_lock(vid, &sender->nid, req->vdi.type)) {
>  		sd_err("locking %"PRIx32 "failed", vid);
> -		return SD_RES_VDI_NOT_LOCKED;
> +		return SD_RES_VDI_LOCKED;
>  	}
>  
>  	return SD_RES_SUCCESS;
> -- 
> 1.8.3.2
> 



More information about the sheepdog mailing list