[Sheepdog] [PATCH] sheep: init hdr.epoch before check_request()
Liu Yuan
namei.unix at gmail.com
Sat May 5 12:09:15 CEST 2012
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;
--
1.7.8.2
More information about the sheepdog
mailing list