[Sheepdog] [PATCH 2/2] sheep: stop serving non-force requests when in halt

Liu Yuan namei.unix at gmail.com
Tue Jan 17 10:04:28 CET 2012


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


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

diff --git a/sheep/sdnet.c b/sheep/sdnet.c
index 4bb9ad9..5db9f29 100644
--- a/sheep/sdnet.c
+++ b/sheep/sdnet.c
@@ -228,6 +228,12 @@ static void queue_request(struct request *req)
 			goto done;
 		}
 		break;
+	case SD_STATUS_HALT:
+		if (!is_force_op(req->op)) {
+			rsp->result = SD_RES_HALT;
+			goto done;
+		}
+		break;
 	default:
 		break;
 	}
-- 
1.7.8.2




More information about the sheepdog mailing list