From: Jianpeng Ma Date: Thu, 17 Sep 2015 02:05:46 +0000 (+0800) Subject: client/MetaRequest: open w/ O_CREAT|O_TRUNC is write. X-Git-Tag: v9.1.0~103^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f51afa63b1c97b99b2d39704a4a06642a277cf43;p=ceph.git client/MetaRequest: open w/ O_CREAT|O_TRUNC is write. From the function name is_write, it judge MetaRequest whether write. For open, if it w/ O_CREAT|O_TRUNC, it's a write op and vice versa. Signed-off-by: Jianpeng Ma --- diff --git a/src/client/MetaRequest.h b/src/client/MetaRequest.h index 1bb0f6d3d94..bb624b297ac 100644 --- a/src/client/MetaRequest.h +++ b/src/client/MetaRequest.h @@ -167,7 +167,7 @@ public: bool is_write() { return (head.op & CEPH_MDS_OP_WRITE) || - (head.op == CEPH_MDS_OP_OPEN && !(head.args.open.flags & (O_CREAT|O_TRUNC))); + (head.op == CEPH_MDS_OP_OPEN && (head.args.open.flags & (O_CREAT|O_TRUNC))); } bool can_forward() { if (is_write() ||