Browse Source

libceph: make ceph_osdc_notify{,_ack}() payload_len u32

The wire format dictates that payload_len fits into 4 bytes.  Take u32
instead of size_t to reflect that.

All callers pass a small integer, so no changes required.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Ilya Dryomov 7 năm trước cách đây
mục cha
commit
6d54228fd1

+ 2 - 2
include/linux/ceph/osd_client.h

@@ -528,12 +528,12 @@ int ceph_osdc_notify_ack(struct ceph_osd_client *osdc,
 			 u64 notify_id,
 			 u64 notify_id,
 			 u64 cookie,
 			 u64 cookie,
 			 void *payload,
 			 void *payload,
-			 size_t payload_len);
+			 u32 payload_len);
 int ceph_osdc_notify(struct ceph_osd_client *osdc,
 int ceph_osdc_notify(struct ceph_osd_client *osdc,
 		     struct ceph_object_id *oid,
 		     struct ceph_object_id *oid,
 		     struct ceph_object_locator *oloc,
 		     struct ceph_object_locator *oloc,
 		     void *payload,
 		     void *payload,
-		     size_t payload_len,
+		     u32 payload_len,
 		     u32 timeout,
 		     u32 timeout,
 		     struct page ***preply_pages,
 		     struct page ***preply_pages,
 		     size_t *preply_len);
 		     size_t *preply_len);

+ 4 - 4
net/ceph/osd_client.c

@@ -4591,7 +4591,7 @@ EXPORT_SYMBOL(ceph_osdc_unwatch);
 
 
 static int osd_req_op_notify_ack_init(struct ceph_osd_request *req, int which,
 static int osd_req_op_notify_ack_init(struct ceph_osd_request *req, int which,
 				      u64 notify_id, u64 cookie, void *payload,
 				      u64 notify_id, u64 cookie, void *payload,
-				      size_t payload_len)
+				      u32 payload_len)
 {
 {
 	struct ceph_osd_req_op *op;
 	struct ceph_osd_req_op *op;
 	struct ceph_pagelist *pl;
 	struct ceph_pagelist *pl;
@@ -4628,7 +4628,7 @@ int ceph_osdc_notify_ack(struct ceph_osd_client *osdc,
 			 u64 notify_id,
 			 u64 notify_id,
 			 u64 cookie,
 			 u64 cookie,
 			 void *payload,
 			 void *payload,
-			 size_t payload_len)
+			 u32 payload_len)
 {
 {
 	struct ceph_osd_request *req;
 	struct ceph_osd_request *req;
 	int ret;
 	int ret;
@@ -4661,7 +4661,7 @@ EXPORT_SYMBOL(ceph_osdc_notify_ack);
 
 
 static int osd_req_op_notify_init(struct ceph_osd_request *req, int which,
 static int osd_req_op_notify_init(struct ceph_osd_request *req, int which,
 				  u64 cookie, u32 prot_ver, u32 timeout,
 				  u64 cookie, u32 prot_ver, u32 timeout,
-				  void *payload, size_t payload_len)
+				  void *payload, u32 payload_len)
 {
 {
 	struct ceph_osd_req_op *op;
 	struct ceph_osd_req_op *op;
 	struct ceph_pagelist *pl;
 	struct ceph_pagelist *pl;
@@ -4701,7 +4701,7 @@ int ceph_osdc_notify(struct ceph_osd_client *osdc,
 		     struct ceph_object_id *oid,
 		     struct ceph_object_id *oid,
 		     struct ceph_object_locator *oloc,
 		     struct ceph_object_locator *oloc,
 		     void *payload,
 		     void *payload,
-		     size_t payload_len,
+		     u32 payload_len,
 		     u32 timeout,
 		     u32 timeout,
 		     struct page ***preply_pages,
 		     struct page ***preply_pages,
 		     size_t *preply_len)
 		     size_t *preply_len)