This is only preparation patch for passing !zero flags to osd_req_op_extent_init() call. Nothing interesting here. Signed-off-by: Roman Penyaev <rpenyaev@xxxxxxx> Cc: Ilya Dryomov <idryomov@xxxxxxxxx> Cc: Sage Weil <sage@xxxxxxxxxx> Cc: Alex Elder <elder@xxxxxxxxxx> Cc: "Yan, Zheng" <zyan@xxxxxxxxxx> Cc: ceph-devel@xxxxxxxxxxxxxxx --- drivers/block/rbd.c | 9 +++++---- include/linux/ceph/osd_client.h | 2 +- net/ceph/osd_client.c | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 1e92b61d0bd5..f45490134880 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1759,7 +1759,7 @@ static int rbd_obj_setup_read(struct rbd_obj_request *obj_req) if (!obj_req->osd_req) return -ENOMEM; - osd_req_op_extent_init(obj_req->osd_req, 0, CEPH_OSD_OP_READ, + osd_req_op_extent_init(obj_req->osd_req, 0, CEPH_OSD_OP_READ, 0, obj_req->ex.oe_off, obj_req->ex.oe_len, 0, 0); rbd_osd_req_setup_data(obj_req, 0); @@ -1806,7 +1806,7 @@ static void __rbd_obj_setup_write(struct rbd_obj_request *obj_req, else opcode = CEPH_OSD_OP_WRITE; - osd_req_op_extent_init(obj_req->osd_req, which, opcode, + osd_req_op_extent_init(obj_req->osd_req, which, opcode, 0, obj_req->ex.oe_off, obj_req->ex.oe_len, 0, 0); rbd_osd_req_setup_data(obj_req, which++); @@ -1849,6 +1849,7 @@ static int rbd_obj_setup_write(struct rbd_obj_request *obj_req) static void __rbd_obj_setup_discard(struct rbd_obj_request *obj_req, unsigned int which) { + u32 flags = 0; u16 opcode; if (rbd_obj_is_entire(obj_req)) { @@ -1868,7 +1869,7 @@ static void __rbd_obj_setup_discard(struct rbd_obj_request *obj_req, } if (opcode) - osd_req_op_extent_init(obj_req->osd_req, which++, opcode, + osd_req_op_extent_init(obj_req->osd_req, which++, opcode, flags, obj_req->ex.oe_off, obj_req->ex.oe_len, 0, 0); @@ -3794,7 +3795,7 @@ static int rbd_obj_read_sync(struct rbd_device *rbd_dev, goto out_req; } - osd_req_op_extent_init(req, 0, CEPH_OSD_OP_READ, 0, buf_len, 0, 0); + osd_req_op_extent_init(req, 0, CEPH_OSD_OP_READ, 0, 0, buf_len, 0, 0); osd_req_op_extent_osd_data_pages(req, 0, pages, buf_len, 0, false, true); diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 2294f963dab7..5150340b07d8 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h @@ -400,7 +400,7 @@ extern void osd_req_op_raw_data_in_pages(struct ceph_osd_request *, extern void osd_req_op_extent_init(struct ceph_osd_request *osd_req, unsigned int which, u16 opcode, - u64 offset, u64 length, + u32 flags, u64 offset, u64 length, u64 truncate_size, u32 truncate_seq); extern void osd_req_op_extent_update(struct ceph_osd_request *osd_req, unsigned int which, u64 length); diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index fa9530dd876e..c1d1d53b6c7a 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -777,12 +777,12 @@ void osd_req_op_init(struct ceph_osd_request *osd_req, EXPORT_SYMBOL(osd_req_op_init); void osd_req_op_extent_init(struct ceph_osd_request *osd_req, - unsigned int which, u16 opcode, + unsigned int which, u16 opcode, u32 flags, u64 offset, u64 length, u64 truncate_size, u32 truncate_seq) { struct ceph_osd_req_op *op = _osd_req_op_init(osd_req, which, - opcode, 0); + opcode, flags); size_t payload_len = 0; BUG_ON(opcode != CEPH_OSD_OP_READ && opcode != CEPH_OSD_OP_WRITE && @@ -1098,7 +1098,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, truncate_size = object_size; } } - osd_req_op_extent_init(req, which, opcode, objoff, objlen, + osd_req_op_extent_init(req, which, opcode, 0, objoff, objlen, truncate_size, truncate_seq); } -- 2.19.1