[sheepdog] [PATCH] sheep: return SD_RES_INVALID_PARMS when cache is not enabled
Liu Yuan
namei.unix at gmail.com
Wed Dec 19 19:37:36 CET 2012
From: Liu Yuan <tailai.ly at taobao.com>
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
sheep/ops.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sheep/ops.c b/sheep/ops.c
index 476f712..f3e68a9 100644
--- a/sheep/ops.c
+++ b/sheep/ops.c
@@ -674,9 +674,10 @@ static int local_get_snap_file(struct request *req)
return ret;
}
+/* Return SD_RES_INVALID_PARMS to ask client not to send flush req again */
static int local_flush_vdi(struct request *req)
{
- int ret = SD_RES_SUCCESS;
+ int ret = SD_RES_INVALID_PARMS;
if (is_object_cache_enabled()) {
ret = object_cache_flush_vdi(req);
--
1.7.9.5
More information about the sheepdog
mailing list