On 04/16/2012 10:16 PM, Liu Yuan wrote: > 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; > } Applied both Thanks, Yuan |