[Sheepdog] [PATCH 1/2] sheep: process gateway request only in fast path

Liu Yuan namei.unix at gmail.com
Mon Apr 16 09:40:53 CEST 2012


On 04/09/2012 01:52 PM, Liu Yuan wrote:

> From: Liu Yuan <tailai.ly at taobao.com>
> 
> For request with flag SD_FLAG_CMD_IO_LOCAL, we handle
> it in normal path.
> 
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
>  sheep/group.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/sheep/group.c b/sheep/group.c
> index 1e840c8..e850c9b 100644
> --- a/sheep/group.c
> +++ b/sheep/group.c
> @@ -1097,7 +1097,8 @@ do_retry:
>  			if (copies > req->nr_zones)
>  				copies = req->nr_zones;
>  
> -			if (object_is_cached(hdr->oid)) {
> +			if (!(req->rq.flags & SD_FLAG_CMD_IO_LOCAL) &&
> +			    object_is_cached(hdr->oid)) {
>  				/* If we have cache of it we are at its service. */
>  				list_add_tail(&req->r_wlist, &sys->outstanding_req_list);
>  				sys->nr_outstanding_io++;


Applied

Thanks,
Yuan



More information about the sheepdog mailing list