[sheepdog] [PATCH stable-0.6 1/3] sheep: check local request if it is in recovery

Hitoshi Mitake mitake.hitoshi at gmail.com
Fri Jul 19 17:51:05 CEST 2013


From: Liu Yuan <namei.unix at gmail.com>

This fixes a panic of a corner case that when object is pushed to backend store
and this object is in recovery, we'll get NO_OBJ error and pusher get paniced.

Signed-off-by: Liu Yuan <namei.unix at gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/request.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/sheep/request.c b/sheep/request.c
index e069d76..76d97e5 100644
--- a/sheep/request.c
+++ b/sheep/request.c
@@ -300,8 +300,12 @@ static void queue_gateway_request(struct request *req)
 	 * If we go for cache object, we don't care if it is being recovered
 	 * Even if it doesn't exist in cache, we'll rely on cache layer to pull
 	 * it.
+	 *
+	 * Not ture for local request because it might go for backend store
+	 * such as pushing cache object, in this case we should check if request
+	 * is in recovery.
 	 */
-	if (sys->enable_object_cache)
+	if (sys->enable_object_cache && !req->local)
 		goto queue_work;
 
 	if (req->local_oid)
-- 
1.7.5.1




More information about the sheepdog mailing list