Lines Matching refs:img_request
294 struct rbd_img_request *img_request; member
1255 switch (obj_req->img_request->data_type) { in rbd_obj_zero_range()
1277 static inline void rbd_img_obj_request_add(struct rbd_img_request *img_request, in rbd_img_obj_request_add() argument
1280 rbd_assert(obj_request->img_request == NULL); in rbd_img_obj_request_add()
1283 obj_request->img_request = img_request; in rbd_img_obj_request_add()
1284 dout("%s: img %p obj %p\n", __func__, img_request, obj_request); in rbd_img_obj_request_add()
1287 static inline void rbd_img_obj_request_del(struct rbd_img_request *img_request, in rbd_img_obj_request_del() argument
1290 dout("%s: img %p obj %p\n", __func__, img_request, obj_request); in rbd_img_obj_request_del()
1292 rbd_assert(obj_request->img_request == img_request); in rbd_img_obj_request_del()
1311 static void img_request_layered_set(struct rbd_img_request *img_request) in img_request_layered_set() argument
1313 set_bit(IMG_REQ_LAYERED, &img_request->flags); in img_request_layered_set()
1316 static bool img_request_layered_test(struct rbd_img_request *img_request) in img_request_layered_test() argument
1318 return test_bit(IMG_REQ_LAYERED, &img_request->flags) != 0; in img_request_layered_test()
1323 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_is_entire()
1331 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_is_tail()
1342 rbd_assert(obj_req->img_request->snapc); in rbd_obj_set_copyup_enabled()
1344 if (obj_req->img_request->op_type == OBJ_OP_DISCARD) { in rbd_obj_set_copyup_enabled()
1357 !obj_req->img_request->snapc->num_snaps) { in rbd_obj_set_copyup_enabled()
1399 if (osd_req->r_result > 0 && rbd_img_is_write(obj_req->img_request)) in rbd_osd_req_callback()
1410 struct rbd_device *rbd_dev = obj_request->img_request->rbd_dev; in rbd_osd_format_read()
1414 osd_req->r_snapid = obj_request->img_request->snap_id; in rbd_osd_format_read()
1430 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in __rbd_obj_add_osd_request()
1464 rbd_assert(obj_req->img_request->snapc); in rbd_obj_add_osd_request()
1465 return __rbd_obj_add_osd_request(obj_req, obj_req->img_request->snapc, in rbd_obj_add_osd_request()
1503 switch (obj_request->img_request->data_type) { in rbd_obj_request_destroy()
1587 static void rbd_img_request_init(struct rbd_img_request *img_request, in rbd_img_request_init() argument
1591 memset(img_request, 0, sizeof(*img_request)); in rbd_img_request_init()
1593 img_request->rbd_dev = rbd_dev; in rbd_img_request_init()
1594 img_request->op_type = op_type; in rbd_img_request_init()
1596 INIT_LIST_HEAD(&img_request->lock_item); in rbd_img_request_init()
1597 INIT_LIST_HEAD(&img_request->object_extents); in rbd_img_request_init()
1598 mutex_init(&img_request->state_mutex); in rbd_img_request_init()
1619 static void rbd_img_request_destroy(struct rbd_img_request *img_request) in rbd_img_request_destroy() argument
1624 dout("%s: img %p\n", __func__, img_request); in rbd_img_request_destroy()
1626 WARN_ON(!list_empty(&img_request->lock_item)); in rbd_img_request_destroy()
1627 for_each_obj_request_safe(img_request, obj_request, next_obj_request) in rbd_img_request_destroy()
1628 rbd_img_obj_request_del(img_request, obj_request); in rbd_img_request_destroy()
1630 if (img_request_layered_test(img_request)) in rbd_img_request_destroy()
1631 rbd_dev_parent_put(img_request->rbd_dev); in rbd_img_request_destroy()
1633 if (rbd_img_is_write(img_request)) in rbd_img_request_destroy()
1634 ceph_put_snap_context(img_request->snapc); in rbd_img_request_destroy()
1636 if (test_bit(IMG_REQ_CHILD, &img_request->flags)) in rbd_img_request_destroy()
1637 kmem_cache_free(rbd_img_request_cache, img_request); in rbd_img_request_destroy()
1953 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_object_map_update_finish()
2060 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_object_map_update()
2138 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_calc_img_extents()
2162 switch (obj_req->img_request->data_type) { in rbd_osd_setup_data()
2229 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in __rbd_osd_setup_write_ops()
2287 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_init_discard()
2376 struct rbd_img_request *img_req = obj_req->img_request; in count_write_ops()
2403 switch (obj_req->img_request->op_type) { in rbd_osd_setup_write_ops()
2759 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_may_exist()
2795 struct rbd_img_request *img_req = obj_req->img_request; in rbd_obj_read_from_parent()
2851 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_advance_read()
2928 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_write_is_noop()
2950 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_write_pre_object_map()
3109 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_copyup_read_parent()
3134 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_copyup_object_maps()
3135 struct ceph_snap_context *snapc = obj_req->img_request->snapc; in rbd_obj_copyup_object_maps()
3182 if (obj_req->img_request->snapc->num_snaps && bytes > 0) { in rbd_obj_copyup_write_object()
3210 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_advance_copyup()
3284 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_write_post_object_map()
3299 struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev; in rbd_obj_advance_write()
3387 struct rbd_img_request *img_req = obj_req->img_request; in __rbd_obj_handle_request()
3414 rbd_img_handle_request(obj_req->img_request, result); in rbd_obj_handle_request()
3606 img_req = obj_req->img_request; in rbd_img_handle_request()
4715 struct rbd_img_request *img_request = in rbd_queue_workfn() local
4717 struct rbd_device *rbd_dev = img_request->rbd_dev; in rbd_queue_workfn()
4718 enum obj_operation_type op_type = img_request->op_type; in rbd_queue_workfn()
4719 struct request *rq = blk_mq_rq_from_pdu(img_request); in rbd_queue_workfn()
4736 rbd_img_capture_header(img_request); in rbd_queue_workfn()
4747 img_request, obj_op_name(op_type), offset, length); in rbd_queue_workfn()
4750 result = rbd_img_fill_nodata(img_request, offset, length); in rbd_queue_workfn()
4752 result = rbd_img_fill_from_bio(img_request, offset, length, in rbd_queue_workfn()
4757 rbd_img_handle_request(img_request, 0); in rbd_queue_workfn()
4761 rbd_img_request_destroy(img_request); in rbd_queue_workfn()