[Sheepdog] [PATCH 1/2] object cache: fix cow write
Liu Yuan
namei.unix at gmail.com
Mon Apr 16 16:16:47 CEST 2012
From: Liu Yuan <tailai.ly at taobao.com>
We should bypass object cache for COW object writing, because
we simply shouldn't create COW object without fetching it first
from the cluster storage
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
sheep/store.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/sheep/store.c b/sheep/store.c
index 1a2deb7..d26aded 100644
--- a/sheep/store.c
+++ b/sheep/store.c
@@ -869,7 +869,8 @@ static int bypass_object_cache(struct sd_obj_req *hdr)
/*
* For vmstate && vdi_attr object, we don't do caching
*/
- if (is_vmstate_obj(oid) || is_vdi_attr_obj(oid))
+ if (is_vmstate_obj(oid) || is_vdi_attr_obj(oid) ||
+ hdr->flags & SD_FLAG_CMD_COW)
return 1;
return 0;
}
--
1.7.8.2
More information about the sheepdog
mailing list