[sheepdog] [PATCH] sheep: check local request if it is in recovery
Liu Yuan
namei.unix at gmail.com
Wed Jun 19 19:13:55 CEST 2013
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>
---
sheep/request.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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.9.5
More information about the sheepdog
mailing list