libceph: encode CEPH_OSD_OP_FLAG_* op flags
authorIlya Dryomov <ilya.dryomov@inktank.com>
Tue, 25 Feb 2014 14:22:26 +0000 (16:22 +0200)
committerYan, Zheng <zheng.z.yan@intel.com>
Thu, 3 Apr 2014 02:33:51 +0000 (10:33 +0800)
Encode ceph_osd_op::flags field so that it gets sent over the wire.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
include/linux/ceph/osd_client.h
include/linux/ceph/rados.h
net/ceph/osd_client.c

index fd47e872ebcc7a35380160dbf2f83ab1563dd878..e94f5da251d6a0d518b72db0d2e6517e2c527b04 100644 (file)
@@ -76,6 +76,7 @@ struct ceph_osd_data {
 
 struct ceph_osd_req_op {
        u16 op;           /* CEPH_OSD_OP_* */
+       u32 flags;        /* CEPH_OSD_OP_FLAG_* */
        u32 payload_len;
        union {
                struct ceph_osd_data raw_data_in;
index 96292df4041ba2aaebe32caa2dae5f731b4fb02c..8f9bf4570215b0bad7f3ef1a3149f402b105f9b8 100644 (file)
@@ -382,7 +382,7 @@ enum {
  */
 struct ceph_osd_op {
        __le16 op;           /* CEPH_OSD_OP_* */
-       __le32 flags;        /* CEPH_OSD_FLAG_* */
+       __le32 flags;        /* CEPH_OSD_OP_FLAG_* */
        union {
                struct {
                        __le64 offset, length;
index 0676f2b199d672eaf61157cdf78b75ee74afb434..5d7fd0b8c1c8024c665df1a3e3ad6bd06f01ab06 100644 (file)
@@ -688,7 +688,9 @@ static u64 osd_req_encode_op(struct ceph_osd_request *req,
 
                return 0;
        }
+
        dst->op = cpu_to_le16(src->op);
+       dst->flags = cpu_to_le32(src->flags);
        dst->payload_len = cpu_to_le32(src->payload_len);
 
        return request_data_len;