diff mbox

[1/6] libceph: encode CEPH_OSD_OP_FLAG_* op flags

Message ID 1393008946-7931-2-git-send-email-ilya.dryomov@inktank.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ilya Dryomov Feb. 21, 2014, 6:55 p.m. UTC
Encode ceph_osd_op::flags field so that it gets sent over the wire.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
---
 include/linux/ceph/osd_client.h |    1 +
 include/linux/ceph/rados.h      |    2 +-
 net/ceph/osd_client.c           |    2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

Comments

Alex Elder Feb. 24, 2014, 2:58 p.m. UTC | #1
On 02/21/2014 12:55 PM, Ilya Dryomov wrote:
> Encode ceph_osd_op::flags field so that it gets sent over the wire.

This looks fine.  The flags field was never being encoded
before, so there's no change in the protocol.  And you're
just adding a flags field to the local structure.

Reviewed-by: Alex Elder <elder@linaro.org>


> Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
> ---
>  include/linux/ceph/osd_client.h |    1 +
>  include/linux/ceph/rados.h      |    2 +-
>  net/ceph/osd_client.c           |    2 ++
>  3 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
> index fd47e872ebcc..e94f5da251d6 100644
> --- a/include/linux/ceph/osd_client.h
> +++ b/include/linux/ceph/osd_client.h
> @@ -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;
> diff --git a/include/linux/ceph/rados.h b/include/linux/ceph/rados.h
> index 96292df4041b..8f9bf4570215 100644
> --- a/include/linux/ceph/rados.h
> +++ b/include/linux/ceph/rados.h
> @@ -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;
> diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
> index 0676f2b199d6..5d7fd0b8c1c8 100644
> --- a/net/ceph/osd_client.c
> +++ b/net/ceph/osd_client.c
> @@ -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;
> 

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index fd47e872ebcc..e94f5da251d6 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -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;
diff --git a/include/linux/ceph/rados.h b/include/linux/ceph/rados.h
index 96292df4041b..8f9bf4570215 100644
--- a/include/linux/ceph/rados.h
+++ b/include/linux/ceph/rados.h
@@ -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;
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 0676f2b199d6..5d7fd0b8c1c8 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -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;