Lines Matching refs:img_req

1419 static bool rbd_img_is_write(struct rbd_img_request *img_req)  in rbd_img_is_write()  argument
1421 switch (img_req->op_type) { in rbd_img_is_write()
1476 struct rbd_img_request *img_req = obj_req->img_request; in rbd_osd_req_create() local
1477 struct rbd_device *rbd_dev = img_req->rbd_dev; in rbd_osd_req_create()
1484 (rbd_img_is_write(img_req) ? img_req->snapc : NULL), in rbd_osd_req_create()
1927 static int __rbd_img_fill_request(struct rbd_img_request *img_req) in __rbd_img_fill_request() argument
1932 for_each_obj_request(img_req, obj_req) { in __rbd_img_fill_request()
1933 switch (img_req->op_type) { in __rbd_img_fill_request()
1969 struct rbd_img_request *img_req = arg; in alloc_object_extent() local
1976 rbd_img_obj_request_add(img_req, obj_req); in alloc_object_extent()
1992 static int rbd_img_fill_request_nocopy(struct rbd_img_request *img_req, in rbd_img_fill_request_nocopy() argument
2000 img_req->data_type = fctx->pos_type; in rbd_img_fill_request_nocopy()
2008 ret = ceph_file_to_extents(&img_req->rbd_dev->layout, in rbd_img_fill_request_nocopy()
2011 &img_req->object_extents, in rbd_img_fill_request_nocopy()
2012 alloc_object_extent, img_req, in rbd_img_fill_request_nocopy()
2018 return __rbd_img_fill_request(img_req); in rbd_img_fill_request_nocopy()
2034 static int rbd_img_fill_request(struct rbd_img_request *img_req, in rbd_img_fill_request() argument
2039 struct rbd_device *rbd_dev = img_req->rbd_dev; in rbd_img_fill_request()
2046 return rbd_img_fill_request_nocopy(img_req, img_extents, in rbd_img_fill_request()
2049 img_req->data_type = OBJ_REQUEST_OWN_BVECS; in rbd_img_fill_request()
2063 &img_req->object_extents, in rbd_img_fill_request()
2064 alloc_object_extent, img_req, in rbd_img_fill_request()
2070 for_each_obj_request(img_req, obj_req) { in rbd_img_fill_request()
2087 &img_req->object_extents, in rbd_img_fill_request()
2093 return __rbd_img_fill_request(img_req); in rbd_img_fill_request()
2096 static int rbd_img_fill_nodata(struct rbd_img_request *img_req, in rbd_img_fill_nodata() argument
2106 return rbd_img_fill_request(img_req, &ex, 1, &fctx); in rbd_img_fill_nodata()
2146 static int __rbd_img_fill_from_bio(struct rbd_img_request *img_req, in __rbd_img_fill_from_bio() argument
2159 return rbd_img_fill_request(img_req, img_extents, num_img_extents, in __rbd_img_fill_from_bio()
2163 static int rbd_img_fill_from_bio(struct rbd_img_request *img_req, in rbd_img_fill_from_bio() argument
2169 return __rbd_img_fill_from_bio(img_req, &ex, 1, &it); in rbd_img_fill_from_bio()
2206 static int __rbd_img_fill_from_bvecs(struct rbd_img_request *img_req, in __rbd_img_fill_from_bvecs() argument
2219 return rbd_img_fill_request(img_req, img_extents, num_img_extents, in __rbd_img_fill_from_bvecs()
2223 static int rbd_img_fill_from_bvecs(struct rbd_img_request *img_req, in rbd_img_fill_from_bvecs() argument
2234 return __rbd_img_fill_from_bvecs(img_req, img_extents, num_img_extents, in rbd_img_fill_from_bvecs()
2253 struct rbd_img_request *img_req = obj_req->img_request; in rbd_obj_read_from_parent() local
2257 child_img_req = rbd_img_request_create(img_req->rbd_dev->parent, in rbd_obj_read_from_parent()
2265 if (!rbd_img_is_write(img_req)) { in rbd_obj_read_from_parent()
2266 switch (img_req->data_type) { in rbd_obj_read_from_parent()
2547 struct rbd_img_request *img_req = obj_req->img_request; in rbd_obj_end_request() local
2553 img_req->xferred += obj_req->xferred; in rbd_obj_end_request()
2557 rbd_warn(img_req->rbd_dev, in rbd_obj_end_request()
2559 obj_op_name(img_req->op_type), obj_req->ex.oe_objno, in rbd_obj_end_request()
2562 if (!img_req->result) { in rbd_obj_end_request()
2563 img_req->result = obj_req->result; in rbd_obj_end_request()
2564 img_req->xferred = 0; in rbd_obj_end_request()
2568 static void rbd_img_end_child_request(struct rbd_img_request *img_req) in rbd_img_end_child_request() argument
2570 struct rbd_obj_request *obj_req = img_req->obj_request; in rbd_img_end_child_request()
2572 rbd_assert(test_bit(IMG_REQ_CHILD, &img_req->flags)); in rbd_img_end_child_request()
2573 rbd_assert((!img_req->result && in rbd_img_end_child_request()
2574 img_req->xferred == rbd_obj_img_extents_bytes(obj_req)) || in rbd_img_end_child_request()
2575 (img_req->result < 0 && !img_req->xferred)); in rbd_img_end_child_request()
2577 obj_req->result = img_req->result; in rbd_img_end_child_request()
2578 obj_req->xferred = img_req->xferred; in rbd_img_end_child_request()
2579 rbd_img_request_put(img_req); in rbd_img_end_child_request()
2582 static void rbd_img_end_request(struct rbd_img_request *img_req) in rbd_img_end_request() argument
2584 rbd_assert(!test_bit(IMG_REQ_CHILD, &img_req->flags)); in rbd_img_end_request()
2585 rbd_assert((!img_req->result && in rbd_img_end_request()
2586 img_req->xferred == blk_rq_bytes(img_req->rq)) || in rbd_img_end_request()
2587 (img_req->result < 0 && !img_req->xferred)); in rbd_img_end_request()
2589 blk_mq_end_request(img_req->rq, in rbd_img_end_request()
2590 errno_to_blk_status(img_req->result)); in rbd_img_end_request()
2591 rbd_img_request_put(img_req); in rbd_img_end_request()
2596 struct rbd_img_request *img_req; in rbd_obj_handle_request() local
2602 img_req = obj_req->img_request; in rbd_obj_handle_request()
2603 spin_lock(&img_req->completion_lock); in rbd_obj_handle_request()
2605 rbd_assert(img_req->pending_count); in rbd_obj_handle_request()
2606 if (--img_req->pending_count) { in rbd_obj_handle_request()
2607 spin_unlock(&img_req->completion_lock); in rbd_obj_handle_request()
2611 spin_unlock(&img_req->completion_lock); in rbd_obj_handle_request()
2612 if (test_bit(IMG_REQ_CHILD, &img_req->flags)) { in rbd_obj_handle_request()
2613 obj_req = img_req->obj_request; in rbd_obj_handle_request()
2614 rbd_img_end_child_request(img_req); in rbd_obj_handle_request()
2617 rbd_img_end_request(img_req); in rbd_obj_handle_request()