Lines Matching refs:osd_req

273 	struct ceph_osd_request	*osd_req;  member
1559 return ceph_osdc_start_request(osdc, obj_request->osd_req, false); in rbd_obj_request_submit()
1565 ceph_osdc_cancel_request(obj_request->osd_req); in rbd_obj_request_end()
1832 static void rbd_osd_req_callback(struct ceph_osd_request *osd_req, in rbd_osd_req_callback() argument
1835 struct rbd_obj_request *obj_request = osd_req->r_priv; in rbd_osd_req_callback()
1838 dout("%s: osd_req %p msg %p\n", __func__, osd_req, msg); in rbd_osd_req_callback()
1839 rbd_assert(osd_req == obj_request->osd_req); in rbd_osd_req_callback()
1847 if (osd_req->r_result < 0) in rbd_osd_req_callback()
1848 obj_request->result = osd_req->r_result; in rbd_osd_req_callback()
1850 rbd_assert(osd_req->r_num_ops <= CEPH_OSD_MAX_OP); in rbd_osd_req_callback()
1857 obj_request->xferred = osd_req->r_reply_op_len[0]; in rbd_osd_req_callback()
1860 opcode = osd_req->r_ops[0].op; in rbd_osd_req_callback()
1866 rbd_assert(osd_req->r_ops[1].op == CEPH_OSD_OP_WRITE || in rbd_osd_req_callback()
1867 osd_req->r_ops[1].op == CEPH_OSD_OP_WRITEFULL); in rbd_osd_req_callback()
1901 struct ceph_osd_request *osd_req = obj_request->osd_req; in rbd_osd_req_format_read() local
1904 rbd_assert(osd_req != NULL); in rbd_osd_req_format_read()
1907 ceph_osdc_build_request(osd_req, obj_request->offset, in rbd_osd_req_format_read()
1914 struct ceph_osd_request *osd_req = obj_request->osd_req; in rbd_osd_req_format_write() local
1918 rbd_assert(osd_req != NULL); in rbd_osd_req_format_write()
1921 ceph_osdc_build_request(osd_req, obj_request->offset, in rbd_osd_req_format_write()
1939 struct ceph_osd_request *osd_req; in rbd_osd_req_create() local
1957 osd_req = ceph_osdc_alloc_request(osdc, snapc, num_ops, false, in rbd_osd_req_create()
1959 if (!osd_req) in rbd_osd_req_create()
1963 osd_req->r_flags = CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK; in rbd_osd_req_create()
1965 osd_req->r_flags = CEPH_OSD_FLAG_READ; in rbd_osd_req_create()
1967 osd_req->r_callback = rbd_osd_req_callback; in rbd_osd_req_create()
1968 osd_req->r_priv = obj_request; in rbd_osd_req_create()
1970 osd_req->r_base_oloc.pool = ceph_file_layout_pg_pool(rbd_dev->layout); in rbd_osd_req_create()
1971 ceph_oid_set_name(&osd_req->r_base_oid, obj_request->object_name); in rbd_osd_req_create()
1973 return osd_req; in rbd_osd_req_create()
1989 struct ceph_osd_request *osd_req; in rbd_osd_req_create_copyup() local
2006 osd_req = ceph_osdc_alloc_request(osdc, snapc, num_osd_ops, in rbd_osd_req_create_copyup()
2008 if (!osd_req) in rbd_osd_req_create_copyup()
2011 osd_req->r_flags = CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK; in rbd_osd_req_create_copyup()
2012 osd_req->r_callback = rbd_osd_req_callback; in rbd_osd_req_create_copyup()
2013 osd_req->r_priv = obj_request; in rbd_osd_req_create_copyup()
2015 osd_req->r_base_oloc.pool = ceph_file_layout_pg_pool(rbd_dev->layout); in rbd_osd_req_create_copyup()
2016 ceph_oid_set_name(&osd_req->r_base_oid, obj_request->object_name); in rbd_osd_req_create_copyup()
2018 return osd_req; in rbd_osd_req_create_copyup()
2022 static void rbd_osd_req_destroy(struct ceph_osd_request *osd_req) in rbd_osd_req_destroy() argument
2024 ceph_osdc_put_request(osd_req); in rbd_osd_req_destroy()
2077 if (obj_request->osd_req) in rbd_obj_request_destroy()
2078 rbd_osd_req_destroy(obj_request->osd_req); in rbd_obj_request_destroy()
2477 struct ceph_osd_request *osd_req; in rbd_img_request_fill() local
2523 osd_req = rbd_osd_req_create(rbd_dev, op_type, in rbd_img_request_fill()
2526 if (!osd_req) in rbd_img_request_fill()
2529 obj_request->osd_req = osd_req; in rbd_img_request_fill()
2533 rbd_img_obj_request_fill(obj_request, osd_req, op_type, 0); in rbd_img_request_fill()
2593 struct ceph_osd_request *osd_req; in rbd_img_obj_parent_read_full_callback() local
2650 osd_req = rbd_osd_req_create_copyup(orig_request); in rbd_img_obj_parent_read_full_callback()
2651 if (!osd_req) in rbd_img_obj_parent_read_full_callback()
2653 rbd_osd_req_destroy(orig_request->osd_req); in rbd_img_obj_parent_read_full_callback()
2654 orig_request->osd_req = osd_req; in rbd_img_obj_parent_read_full_callback()
2660 osd_req_op_cls_init(osd_req, 0, CEPH_OSD_OP_CALL, "rbd", "copyup"); in rbd_img_obj_parent_read_full_callback()
2661 osd_req_op_cls_request_data_pages(osd_req, 0, pages, parent_length, 0, in rbd_img_obj_parent_read_full_callback()
2667 rbd_img_obj_request_fill(orig_request, osd_req, op_type, 1); in rbd_img_obj_parent_read_full_callback()
2883 stat_request->osd_req = rbd_osd_req_create(rbd_dev, OBJ_OP_READ, 1, in rbd_img_obj_exists_submit()
2885 if (!stat_request->osd_req) in rbd_img_obj_exists_submit()
2889 osd_req_op_init(stat_request->osd_req, 0, CEPH_OSD_OP_STAT, 0); in rbd_img_obj_exists_submit()
2890 osd_req_op_raw_data_in_pages(stat_request->osd_req, 0, pages, size, 0, in rbd_img_obj_exists_submit()
3108 obj_request->osd_req = rbd_osd_req_create(rbd_dev, OBJ_OP_READ, 1, in rbd_obj_notify_ack_sync()
3110 if (!obj_request->osd_req) in rbd_obj_notify_ack_sync()
3113 osd_req_op_watch_init(obj_request->osd_req, 0, CEPH_OSD_OP_NOTIFY_ACK, in rbd_obj_notify_ack_sync()
3172 obj_request->osd_req = rbd_osd_req_create(rbd_dev, OBJ_OP_WRITE, 1, in rbd_obj_watch_request_helper()
3174 if (!obj_request->osd_req) { in rbd_obj_watch_request_helper()
3179 osd_req_op_watch_init(obj_request->osd_req, 0, CEPH_OSD_OP_WATCH, in rbd_obj_watch_request_helper()
3184 ceph_osdc_set_request_linger(osdc, obj_request->osd_req); in rbd_obj_watch_request_helper()
3310 obj_request->osd_req = rbd_osd_req_create(rbd_dev, OBJ_OP_READ, 1, in rbd_obj_method_sync()
3312 if (!obj_request->osd_req) in rbd_obj_method_sync()
3315 osd_req_op_cls_init(obj_request->osd_req, 0, CEPH_OSD_OP_CALL, in rbd_obj_method_sync()
3326 osd_req_op_cls_request_data_pagelist(obj_request->osd_req, 0, in rbd_obj_method_sync()
3329 osd_req_op_cls_response_data_pages(obj_request->osd_req, 0, in rbd_obj_method_sync()
3526 obj_request->osd_req = rbd_osd_req_create(rbd_dev, OBJ_OP_READ, 1, in rbd_obj_read_sync()
3528 if (!obj_request->osd_req) in rbd_obj_read_sync()
3531 osd_req_op_extent_init(obj_request->osd_req, 0, CEPH_OSD_OP_READ, in rbd_obj_read_sync()
3533 osd_req_op_extent_osd_data_pages(obj_request->osd_req, 0, in rbd_obj_read_sync()