• Home
  • Raw
  • Download

Lines Matching refs:pending_req

208 				struct pending_req *pending_req);
470 static struct pending_req *alloc_req(struct xen_blkif_ring *ring) in alloc_req()
472 struct pending_req *req = NULL; in alloc_req()
477 req = list_entry(ring->pending_free.next, struct pending_req, in alloc_req()
489 static void free_req(struct xen_blkif_ring *ring, struct pending_req *req) in free_req()
722 struct pending_req *pending_req = (struct pending_req *)(data->data); in xen_blkbk_unmap_and_respond_callback() local
723 struct xen_blkif_ring *ring = pending_req->ring; in xen_blkbk_unmap_and_respond_callback()
731 make_response(ring, pending_req->id, in xen_blkbk_unmap_and_respond_callback()
732 pending_req->operation, pending_req->status); in xen_blkbk_unmap_and_respond_callback()
733 free_req(ring, pending_req); in xen_blkbk_unmap_and_respond_callback()
752 static void xen_blkbk_unmap_and_respond(struct pending_req *req) in xen_blkbk_unmap_and_respond()
944 static int xen_blkbk_map_seg(struct pending_req *pending_req) in xen_blkbk_map_seg() argument
948 rc = xen_blkbk_map(pending_req->ring, pending_req->segments, in xen_blkbk_map_seg()
949 pending_req->nr_segs, in xen_blkbk_map_seg()
950 (pending_req->operation != BLKIF_OP_READ)); in xen_blkbk_map_seg()
956 struct pending_req *pending_req, in xen_blkbk_parse_indirect() argument
960 struct grant_page **pages = pending_req->indirect_pages; in xen_blkbk_parse_indirect()
961 struct xen_blkif_ring *ring = pending_req->ring; in xen_blkbk_parse_indirect()
965 nseg = pending_req->nr_segs; in xen_blkbk_parse_indirect()
987 pending_req->segments[n]->gref = segments[i].gref; in xen_blkbk_parse_indirect()
1053 struct pending_req *pending_req) in dispatch_other_io() argument
1055 free_req(ring, pending_req); in dispatch_other_io()
1078 static void __end_block_io_op(struct pending_req *pending_req, in __end_block_io_op() argument
1082 if (pending_req->operation == BLKIF_OP_FLUSH_DISKCACHE && in __end_block_io_op()
1085 xen_blkbk_flush_diskcache(XBT_NIL, pending_req->ring->blkif->be, 0); in __end_block_io_op()
1086 pending_req->status = BLKIF_RSP_EOPNOTSUPP; in __end_block_io_op()
1087 } else if (pending_req->operation == BLKIF_OP_WRITE_BARRIER && in __end_block_io_op()
1090 xen_blkbk_barrier(XBT_NIL, pending_req->ring->blkif->be, 0); in __end_block_io_op()
1091 pending_req->status = BLKIF_RSP_EOPNOTSUPP; in __end_block_io_op()
1095 pending_req->status = BLKIF_RSP_ERROR; in __end_block_io_op()
1103 if (atomic_dec_and_test(&pending_req->pendcnt)) in __end_block_io_op()
1104 xen_blkbk_unmap_and_respond(pending_req); in __end_block_io_op()
1128 struct pending_req *pending_req; in __do_block_io_op() local
1152 pending_req = alloc_req(ring); in __do_block_io_op()
1153 if (NULL == pending_req) { in __do_block_io_op()
1183 if (dispatch_rw_block_io(ring, &req, pending_req)) in __do_block_io_op()
1187 free_req(ring, pending_req); in __do_block_io_op()
1192 if (dispatch_other_io(ring, &req, pending_req)) in __do_block_io_op()
1226 struct pending_req *pending_req) in dispatch_rw_block_io() argument
1229 struct seg_buf *seg = pending_req->seg; in dispatch_rw_block_io()
1232 struct bio **biolist = pending_req->biolist; in dispatch_rw_block_io()
1238 struct grant_page **pages = pending_req->segments; in dispatch_rw_block_io()
1291 pending_req->ring = ring; in dispatch_rw_block_io()
1292 pending_req->id = req->u.rw.id; in dispatch_rw_block_io()
1293 pending_req->operation = req_operation; in dispatch_rw_block_io()
1294 pending_req->status = BLKIF_RSP_OKAY; in dispatch_rw_block_io()
1295 pending_req->nr_segs = nseg; in dispatch_rw_block_io()
1314 if (xen_blkbk_parse_indirect(req, pending_req, seg, &preq)) in dispatch_rw_block_io()
1344 xen_blk_drain_io(pending_req->ring); in dispatch_rw_block_io()
1352 if (xen_blkbk_map_seg(pending_req)) in dispatch_rw_block_io()
1376 bio->bi_private = pending_req; in dispatch_rw_block_io()
1395 bio->bi_private = pending_req; in dispatch_rw_block_io()
1400 atomic_set(&pending_req->pendcnt, nbio); in dispatch_rw_block_io()
1417 xen_blkbk_unmap(ring, pending_req->segments, in dispatch_rw_block_io()
1418 pending_req->nr_segs); in dispatch_rw_block_io()
1422 free_req(ring, pending_req); in dispatch_rw_block_io()
1429 atomic_set(&pending_req->pendcnt, 1); in dispatch_rw_block_io()
1430 __end_block_io_op(pending_req, BLK_STS_RESOURCE); in dispatch_rw_block_io()