[Sheepdog] [PATCH] sheep: init hdr.epoch before check_request()
Liu Yuan
namei.unix at gmail.com
Mon May 7 08:10:39 CEST 2012
On 05/05/2012 06:09 PM, Liu Yuan wrote:
> From: Liu Yuan <tailai.ly at taobao.com>
>
>
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
> sheep/sdnet.c | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/sheep/sdnet.c b/sheep/sdnet.c
> index 1e001af..d9bce3a 100644
> --- a/sheep/sdnet.c
> +++ b/sheep/sdnet.c
> @@ -297,6 +297,15 @@ static void queue_request(struct request *req)
> break;
> }
>
> + /*
> + * we set epoch for non direct requests here. Note that we
> + * can't access to sys->epoch after calling
> + * process_request_event_queues(that is, passing requests to work
> + * threads).
> + */
> + if (!(hdr->flags & SD_FLAG_CMD_IO_LOCAL))
> + hdr->epoch = sys->epoch;
> +
> req->vnodes = get_vnode_info();
> if (is_io_op(req->op)) {
> req->work.fn = do_io_request;
> @@ -316,15 +325,6 @@ static void queue_request(struct request *req)
> req->done(req);
> return;
> }
> - /*
> - * we set epoch for non direct requests here. Note that we
> - * can't access to sys->epoch after calling
> - * process_request_event_queues(that is, passing requests to work
> - * threads).
> - */
> - if (!(hdr->flags & SD_FLAG_CMD_IO_LOCAL))
> - hdr->epoch = sys->epoch;
> -
> list_del(&req->r_wlist);
>
> cevent->ctype = EVENT_REQUEST;
Applied after rebasing to the master
Thanks,
Yuan
More information about the sheepdog
mailing list