Lines Matching refs:img_request

294 	struct rbd_img_request	*img_request;  member
1252 switch (obj_req->img_request->data_type) { in rbd_obj_zero_range()
1274 static inline void rbd_img_obj_request_add(struct rbd_img_request *img_request, in rbd_img_obj_request_add() argument
1277 rbd_assert(obj_request->img_request == NULL); in rbd_img_obj_request_add()
1280 obj_request->img_request = img_request; in rbd_img_obj_request_add()
1281 dout("%s: img %p obj %p\n", __func__, img_request, obj_request); in rbd_img_obj_request_add()
1284 static inline void rbd_img_obj_request_del(struct rbd_img_request *img_request, in rbd_img_obj_request_del() argument
1287 dout("%s: img %p obj %p\n", __func__, img_request, obj_request); in rbd_img_obj_request_del()
1289 rbd_assert(obj_request->img_request == img_request); in rbd_img_obj_request_del()
1308 static void img_request_layered_set(struct rbd_img_request *img_request) in img_request_layered_set() argument
1310 set_bit(IMG_REQ_LAYERED, &img_request->flags); in img_request_layered_set()
1313 static bool img_request_layered_test(struct rbd_img_request *img_request) in img_request_layered_test() argument
1315 return test_bit(IMG_REQ_LAYERED, &img_request->flags) != 0; in img_request_layered_test()
1320 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_is_entire()
1328 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_is_tail()
1341 !obj_req->img_request->snapc->num_snaps)) in rbd_obj_copyup_enabled()
1380 if (osd_req->r_result > 0 && rbd_img_is_write(obj_req->img_request)) in rbd_osd_req_callback()
1391 struct rbd_device *rbd_dev = obj_request->img_request->rbd_dev; in rbd_osd_format_read()
1395 osd_req->r_snapid = obj_request->img_request->snap_id; in rbd_osd_format_read()
1411 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in __rbd_obj_add_osd_request()
1445 return __rbd_obj_add_osd_request(obj_req, obj_req->img_request->snapc, in rbd_obj_add_osd_request()
1483 switch (obj_request->img_request->data_type) { in rbd_obj_request_destroy()
1567 static void rbd_img_request_init(struct rbd_img_request *img_request, in rbd_img_request_init() argument
1571 memset(img_request, 0, sizeof(*img_request)); in rbd_img_request_init()
1573 img_request->rbd_dev = rbd_dev; in rbd_img_request_init()
1574 img_request->op_type = op_type; in rbd_img_request_init()
1576 INIT_LIST_HEAD(&img_request->lock_item); in rbd_img_request_init()
1577 INIT_LIST_HEAD(&img_request->object_extents); in rbd_img_request_init()
1578 mutex_init(&img_request->state_mutex); in rbd_img_request_init()
1596 static void rbd_img_request_destroy(struct rbd_img_request *img_request) in rbd_img_request_destroy() argument
1601 dout("%s: img %p\n", __func__, img_request); in rbd_img_request_destroy()
1603 WARN_ON(!list_empty(&img_request->lock_item)); in rbd_img_request_destroy()
1604 for_each_obj_request_safe(img_request, obj_request, next_obj_request) in rbd_img_request_destroy()
1605 rbd_img_obj_request_del(img_request, obj_request); in rbd_img_request_destroy()
1607 if (img_request_layered_test(img_request)) in rbd_img_request_destroy()
1608 rbd_dev_parent_put(img_request->rbd_dev); in rbd_img_request_destroy()
1610 if (rbd_img_is_write(img_request)) in rbd_img_request_destroy()
1611 ceph_put_snap_context(img_request->snapc); in rbd_img_request_destroy()
1613 if (test_bit(IMG_REQ_CHILD, &img_request->flags)) in rbd_img_request_destroy()
1614 kmem_cache_free(rbd_img_request_cache, img_request); in rbd_img_request_destroy()
1930 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_object_map_update_finish()
2037 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_object_map_update()
2115 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_calc_img_extents()
2139 switch (obj_req->img_request->data_type) { in rbd_osd_setup_data()
2206 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in __rbd_osd_setup_write_ops()
2267 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_init_discard()
2358 struct rbd_img_request *img_req = obj_req->img_request; in count_write_ops()
2385 switch (obj_req->img_request->op_type) { in rbd_osd_setup_write_ops()
2741 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_may_exist()
2777 struct rbd_img_request *img_req = obj_req->img_request; in rbd_obj_read_from_parent()
2833 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_advance_read()
2910 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_write_is_noop()
2932 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_write_pre_object_map()
3092 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_copyup_read_parent()
3117 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_copyup_object_maps()
3118 struct ceph_snap_context *snapc = obj_req->img_request->snapc; in rbd_obj_copyup_object_maps()
3165 if (obj_req->img_request->snapc->num_snaps && bytes > 0) { in rbd_obj_copyup_write_object()
3193 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_advance_copyup()
3267 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_write_post_object_map()
3282 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_advance_write()
3369 struct rbd_img_request *img_req = obj_req->img_request; in __rbd_obj_handle_request()
3396 rbd_img_handle_request(obj_req->img_request, result); in rbd_obj_handle_request()
3582 img_req = obj_req->img_request; in rbd_img_handle_request()
4636 struct rbd_img_request *img_request = in rbd_queue_workfn() local
4638 struct rbd_device *rbd_dev = img_request->rbd_dev; in rbd_queue_workfn()
4639 enum obj_operation_type op_type = img_request->op_type; in rbd_queue_workfn()
4640 struct request *rq = blk_mq_rq_from_pdu(img_request); in rbd_queue_workfn()
4657 rbd_img_capture_header(img_request); in rbd_queue_workfn()
4668 img_request, obj_op_name(op_type), offset, length); in rbd_queue_workfn()
4671 result = rbd_img_fill_nodata(img_request, offset, length); in rbd_queue_workfn()
4673 result = rbd_img_fill_from_bio(img_request, offset, length, in rbd_queue_workfn()
4678 rbd_img_handle_request(img_request, 0); in rbd_queue_workfn()
4682 rbd_img_request_destroy(img_request); in rbd_queue_workfn()