[sheepdog] [PATCH 3/5] sheep: rename check_request_busy()

Liu Yuan namei.unix at gmail.com
Fri Jun 1 11:31:35 CEST 2012


From: Liu Yuan <tailai.ly at taobao.com>

It only checks if the targeted oid is in recovery, so better rename it to
reflect the change.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 sheep/sdnet.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sheep/sdnet.c b/sheep/sdnet.c
index 2014e1e..dd3cccc 100644
--- a/sheep/sdnet.c
+++ b/sheep/sdnet.c
@@ -223,7 +223,7 @@ static int check_request_epoch(struct request *req)
 	return 0;
 }
 
-static int check_request_busy(struct request *req)
+static int check_request_in_recovery(struct request *req)
 {
 	/*
 	 * Request from recovery should not wait for objects under recovery to
@@ -331,7 +331,7 @@ static void queue_io_request(struct request *req)
 	if (req->local_oid) {
 		if (check_request_epoch(req) < 0)
 			return;
-		if (check_request_busy(req) < 0)
+		if (check_request_in_recovery(req) < 0)
 			return;
 	}
 	list_add_tail(&req->request_list, &sys->outstanding_req_list);
@@ -349,14 +349,13 @@ static void queue_gateway_request(struct request *req)
 		req->local_oid = hdr->obj.oid;
 
 	/*
-	 * If we go for a cached object, we don't care if it is busy
-	 * or being recovered.
+	 * If we go for a cached object, we don't care if it is being recovered.
 	 */
 	if (req->local_oid &&
 	    (!sys->enable_write_cache ||
 	     !(req->rq.flags & SD_FLAG_CMD_CACHE) ||
 	     !object_is_cached(req->rq.obj.oid))) {
-		if (check_request_busy(req) < 0)
+		if (check_request_in_recovery(req) < 0)
 			return;
 	}
 
-- 
1.7.10.2




More information about the sheepdog mailing list