Lines Matching refs:osd_req
273 struct ceph_osd_request *osd_req; member
1557 return ceph_osdc_start_request(osdc, obj_request->osd_req, false); in rbd_obj_request_submit()
1563 ceph_osdc_cancel_request(obj_request->osd_req); in rbd_obj_request_end()
1813 static void rbd_osd_req_callback(struct ceph_osd_request *osd_req, in rbd_osd_req_callback() argument
1816 struct rbd_obj_request *obj_request = osd_req->r_priv; in rbd_osd_req_callback()
1819 dout("%s: osd_req %p msg %p\n", __func__, osd_req, msg); in rbd_osd_req_callback()
1820 rbd_assert(osd_req == obj_request->osd_req); in rbd_osd_req_callback()
1828 if (osd_req->r_result < 0) in rbd_osd_req_callback()
1829 obj_request->result = osd_req->r_result; in rbd_osd_req_callback()
1831 rbd_assert(osd_req->r_num_ops <= CEPH_OSD_MAX_OP); in rbd_osd_req_callback()
1838 obj_request->xferred = osd_req->r_reply_op_len[0]; in rbd_osd_req_callback()
1841 opcode = osd_req->r_ops[0].op; in rbd_osd_req_callback()
1847 rbd_assert(osd_req->r_ops[1].op == CEPH_OSD_OP_WRITE); in rbd_osd_req_callback()
1880 struct ceph_osd_request *osd_req = obj_request->osd_req; in rbd_osd_req_format_read() local
1883 rbd_assert(osd_req != NULL); in rbd_osd_req_format_read()
1886 ceph_osdc_build_request(osd_req, obj_request->offset, in rbd_osd_req_format_read()
1893 struct ceph_osd_request *osd_req = obj_request->osd_req; in rbd_osd_req_format_write() local
1897 rbd_assert(osd_req != NULL); in rbd_osd_req_format_write()
1900 ceph_osdc_build_request(osd_req, obj_request->offset, in rbd_osd_req_format_write()
1918 struct ceph_osd_request *osd_req; in rbd_osd_req_create() local
1936 osd_req = ceph_osdc_alloc_request(osdc, snapc, num_ops, false, in rbd_osd_req_create()
1938 if (!osd_req) in rbd_osd_req_create()
1942 osd_req->r_flags = CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK; in rbd_osd_req_create()
1944 osd_req->r_flags = CEPH_OSD_FLAG_READ; in rbd_osd_req_create()
1946 osd_req->r_callback = rbd_osd_req_callback; in rbd_osd_req_create()
1947 osd_req->r_priv = obj_request; in rbd_osd_req_create()
1949 osd_req->r_base_oloc.pool = ceph_file_layout_pg_pool(rbd_dev->layout); in rbd_osd_req_create()
1950 ceph_oid_set_name(&osd_req->r_base_oid, obj_request->object_name); in rbd_osd_req_create()
1952 return osd_req; in rbd_osd_req_create()
1968 struct ceph_osd_request *osd_req; in rbd_osd_req_create_copyup() local
1985 osd_req = ceph_osdc_alloc_request(osdc, snapc, num_osd_ops, in rbd_osd_req_create_copyup()
1987 if (!osd_req) in rbd_osd_req_create_copyup()
1990 osd_req->r_flags = CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK; in rbd_osd_req_create_copyup()
1991 osd_req->r_callback = rbd_osd_req_callback; in rbd_osd_req_create_copyup()
1992 osd_req->r_priv = obj_request; in rbd_osd_req_create_copyup()
1994 osd_req->r_base_oloc.pool = ceph_file_layout_pg_pool(rbd_dev->layout); in rbd_osd_req_create_copyup()
1995 ceph_oid_set_name(&osd_req->r_base_oid, obj_request->object_name); in rbd_osd_req_create_copyup()
1997 return osd_req; in rbd_osd_req_create_copyup()
2001 static void rbd_osd_req_destroy(struct ceph_osd_request *osd_req) in rbd_osd_req_destroy() argument
2003 ceph_osdc_put_request(osd_req); in rbd_osd_req_destroy()
2056 if (obj_request->osd_req) in rbd_obj_request_destroy()
2057 rbd_osd_req_destroy(obj_request->osd_req); in rbd_obj_request_destroy()
2453 struct ceph_osd_request *osd_req; in rbd_img_request_fill() local
2499 osd_req = rbd_osd_req_create(rbd_dev, op_type, in rbd_img_request_fill()
2502 if (!osd_req) in rbd_img_request_fill()
2505 obj_request->osd_req = osd_req; in rbd_img_request_fill()
2509 rbd_img_obj_request_fill(obj_request, osd_req, op_type, 0); in rbd_img_request_fill()
2569 struct ceph_osd_request *osd_req; in rbd_img_obj_parent_read_full_callback() local
2626 osd_req = rbd_osd_req_create_copyup(orig_request); in rbd_img_obj_parent_read_full_callback()
2627 if (!osd_req) in rbd_img_obj_parent_read_full_callback()
2629 rbd_osd_req_destroy(orig_request->osd_req); in rbd_img_obj_parent_read_full_callback()
2630 orig_request->osd_req = osd_req; in rbd_img_obj_parent_read_full_callback()
2636 osd_req_op_cls_init(osd_req, 0, CEPH_OSD_OP_CALL, "rbd", "copyup"); in rbd_img_obj_parent_read_full_callback()
2637 osd_req_op_cls_request_data_pages(osd_req, 0, pages, parent_length, 0, in rbd_img_obj_parent_read_full_callback()
2643 rbd_img_obj_request_fill(orig_request, osd_req, op_type, 1); in rbd_img_obj_parent_read_full_callback()
2859 stat_request->osd_req = rbd_osd_req_create(rbd_dev, OBJ_OP_READ, 1, in rbd_img_obj_exists_submit()
2861 if (!stat_request->osd_req) in rbd_img_obj_exists_submit()
2865 osd_req_op_init(stat_request->osd_req, 0, CEPH_OSD_OP_STAT); in rbd_img_obj_exists_submit()
2866 osd_req_op_raw_data_in_pages(stat_request->osd_req, 0, pages, size, 0, in rbd_img_obj_exists_submit()
3084 obj_request->osd_req = rbd_osd_req_create(rbd_dev, OBJ_OP_READ, 1, in rbd_obj_notify_ack_sync()
3086 if (!obj_request->osd_req) in rbd_obj_notify_ack_sync()
3089 osd_req_op_watch_init(obj_request->osd_req, 0, CEPH_OSD_OP_NOTIFY_ACK, in rbd_obj_notify_ack_sync()
3147 obj_request->osd_req = rbd_osd_req_create(rbd_dev, OBJ_OP_WRITE, 1, in rbd_obj_watch_request_helper()
3149 if (!obj_request->osd_req) { in rbd_obj_watch_request_helper()
3154 osd_req_op_watch_init(obj_request->osd_req, 0, CEPH_OSD_OP_WATCH, in rbd_obj_watch_request_helper()
3159 ceph_osdc_set_request_linger(osdc, obj_request->osd_req); in rbd_obj_watch_request_helper()
3285 obj_request->osd_req = rbd_osd_req_create(rbd_dev, OBJ_OP_READ, 1, in rbd_obj_method_sync()
3287 if (!obj_request->osd_req) in rbd_obj_method_sync()
3290 osd_req_op_cls_init(obj_request->osd_req, 0, CEPH_OSD_OP_CALL, in rbd_obj_method_sync()
3301 osd_req_op_cls_request_data_pagelist(obj_request->osd_req, 0, in rbd_obj_method_sync()
3304 osd_req_op_cls_response_data_pages(obj_request->osd_req, 0, in rbd_obj_method_sync()
3547 obj_request->osd_req = rbd_osd_req_create(rbd_dev, OBJ_OP_READ, 1, in rbd_obj_read_sync()
3549 if (!obj_request->osd_req) in rbd_obj_read_sync()
3552 osd_req_op_extent_init(obj_request->osd_req, 0, CEPH_OSD_OP_READ, in rbd_obj_read_sync()
3554 osd_req_op_extent_osd_data_pages(obj_request->osd_req, 0, in rbd_obj_read_sync()