blkif 235 drivers/block/xen-blkback/blkback.c struct xen_blkif *blkif = ring->blkif; blkif 238 drivers/block/xen-blkback/blkback.c if (!blkif->vbd.overflow_max_grants) blkif 239 drivers/block/xen-blkback/blkback.c blkif->vbd.overflow_max_grants = 1; blkif 402 drivers/block/xen-blkback/blkback.c !ring->blkif->vbd.overflow_max_grants)) { blkif 456 drivers/block/xen-blkback/blkback.c ring->blkif->vbd.overflow_max_grants = 0; blkif 505 drivers/block/xen-blkback/blkback.c static int xen_vbd_translate(struct phys_req *req, struct xen_blkif *blkif, blkif 508 drivers/block/xen-blkback/blkback.c struct xen_vbd *vbd = &blkif->vbd; blkif 531 drivers/block/xen-blkback/blkback.c static void xen_vbd_resize(struct xen_blkif *blkif) blkif 533 drivers/block/xen-blkback/blkback.c struct xen_vbd *vbd = &blkif->vbd; blkif 536 drivers/block/xen-blkback/blkback.c struct xenbus_device *dev = xen_blkbk_xenbus(blkif->be); blkif 540 drivers/block/xen-blkback/blkback.c blkif->domid, MAJOR(vbd->pdevice), MINOR(vbd->pdevice)); blkif 614 drivers/block/xen-blkback/blkback.c struct xen_blkif *blkif = ring->blkif; blkif 615 drivers/block/xen-blkback/blkback.c struct xen_vbd *vbd = &blkif->vbd; blkif 624 drivers/block/xen-blkback/blkback.c xen_vbd_resize(blkif); blkif 653 drivers/block/xen-blkback/blkback.c if (blkif->vbd.feature_gnt_persistent && blkif 724 drivers/block/xen-blkback/blkback.c struct xen_blkif *blkif = ring->blkif; blkif 746 drivers/block/xen-blkback/blkback.c if (atomic_dec_and_test(&ring->inflight) && atomic_read(&blkif->drain)) { blkif 747 drivers/block/xen-blkback/blkback.c complete(&blkif->drain_complete); blkif 749 drivers/block/xen-blkback/blkback.c xen_blkif_put(blkif); blkif 817 drivers/block/xen-blkback/blkback.c struct xen_blkif *blkif = ring->blkif; blkif 819 drivers/block/xen-blkback/blkback.c use_persistent_gnts = (blkif->vbd.feature_gnt_persistent); blkif 854 drivers/block/xen-blkback/blkback.c blkif->domid); blkif 917 drivers/block/xen-blkback/blkback.c if (use_persistent_gnts && !blkif->vbd.overflow_max_grants) { blkif 918 drivers/block/xen-blkback/blkback.c blkif->vbd.overflow_max_grants = 1; blkif 920 drivers/block/xen-blkback/blkback.c blkif->domid, blkif->vbd.handle); blkif 1013 drivers/block/xen-blkback/blkback.c struct xen_blkif *blkif = ring->blkif; blkif 1014 drivers/block/xen-blkback/blkback.c struct block_device *bdev = blkif->vbd.bdev; blkif 1018 drivers/block/xen-blkback/blkback.c xen_blkif_get(blkif); blkif 1023 drivers/block/xen-blkback/blkback.c err = xen_vbd_translate(&preq, blkif, REQ_OP_WRITE); blkif 1027 drivers/block/xen-blkback/blkback.c preq.sector_number + preq.nr_sects, blkif->vbd.pdevice); blkif 1032 drivers/block/xen-blkback/blkback.c secure = (blkif->vbd.discard_secure && blkif 1047 drivers/block/xen-blkback/blkback.c xen_blkif_put(blkif); blkif 1063 drivers/block/xen-blkback/blkback.c struct xen_blkif *blkif = ring->blkif; blkif 1065 drivers/block/xen-blkback/blkback.c atomic_set(&blkif->drain, 1); blkif 1070 drivers/block/xen-blkback/blkback.c &blkif->drain_complete, HZ); blkif 1072 drivers/block/xen-blkback/blkback.c if (!atomic_read(&blkif->drain)) blkif 1075 drivers/block/xen-blkback/blkback.c atomic_set(&blkif->drain, 0); blkif 1085 drivers/block/xen-blkback/blkback.c xen_blkbk_flush_diskcache(XBT_NIL, pending_req->ring->blkif->be, 0); blkif 1090 drivers/block/xen-blkback/blkback.c xen_blkbk_barrier(XBT_NIL, pending_req->ring->blkif->be, 0); blkif 1139 drivers/block/xen-blkback/blkback.c rp, rc, rp - rc, ring->blkif->vbd.pdevice); blkif 1159 drivers/block/xen-blkback/blkback.c switch (ring->blkif->blk_protocol) { blkif 1318 drivers/block/xen-blkback/blkback.c if (xen_vbd_translate(&preq, ring->blkif, operation) != 0) { blkif 1323 drivers/block/xen-blkback/blkback.c ring->blkif->vbd.pdevice); blkif 1335 drivers/block/xen-blkback/blkback.c ring->blkif->domid); blkif 1359 drivers/block/xen-blkback/blkback.c xen_blkif_get(ring->blkif); blkif 1451 drivers/block/xen-blkback/blkback.c switch (ring->blkif->blk_protocol) { blkif 299 drivers/block/xen-blkback/common.h struct xen_blkif *blkif; blkif 23 drivers/block/xen-blkback/xenbus.c struct xen_blkif *blkif; blkif 35 drivers/block/xen-blkback/xenbus.c static void xen_blkif_free(struct xen_blkif *blkif); blkif 49 drivers/block/xen-blkback/xenbus.c struct xen_blkif *blkif; blkif 51 drivers/block/xen-blkback/xenbus.c blkif = container_of(work, struct xen_blkif, free_work); blkif 52 drivers/block/xen-blkback/xenbus.c xen_blkif_free(blkif); blkif 55 drivers/block/xen-blkback/xenbus.c static int blkback_name(struct xen_blkif *blkif, char *buf) blkif 58 drivers/block/xen-blkback/xenbus.c struct xenbus_device *dev = blkif->be->dev; blkif 70 drivers/block/xen-blkback/xenbus.c snprintf(buf, TASK_COMM_LEN, "%d.%s", blkif->domid, devname); blkif 76 drivers/block/xen-blkback/xenbus.c static void xen_update_blkif_status(struct xen_blkif *blkif) blkif 84 drivers/block/xen-blkback/xenbus.c if (!blkif->rings || !blkif->rings[0].irq || !blkif->vbd.bdev) blkif 88 drivers/block/xen-blkback/xenbus.c if (blkif->be->dev->state == XenbusStateConnected) blkif 92 drivers/block/xen-blkback/xenbus.c connect(blkif->be); blkif 93 drivers/block/xen-blkback/xenbus.c if (blkif->be->dev->state != XenbusStateConnected) blkif 96 drivers/block/xen-blkback/xenbus.c err = blkback_name(blkif, name); blkif 98 drivers/block/xen-blkback/xenbus.c xenbus_dev_error(blkif->be->dev, err, "get blkback dev name"); blkif 102 drivers/block/xen-blkback/xenbus.c err = filemap_write_and_wait(blkif->vbd.bdev->bd_inode->i_mapping); blkif 104 drivers/block/xen-blkback/xenbus.c xenbus_dev_error(blkif->be->dev, err, "block flush"); blkif 107 drivers/block/xen-blkback/xenbus.c invalidate_inode_pages2(blkif->vbd.bdev->bd_inode->i_mapping); blkif 109 drivers/block/xen-blkback/xenbus.c for (i = 0; i < blkif->nr_rings; i++) { blkif 110 drivers/block/xen-blkback/xenbus.c ring = &blkif->rings[i]; blkif 115 drivers/block/xen-blkback/xenbus.c xenbus_dev_fatal(blkif->be->dev, err, blkif 124 drivers/block/xen-blkback/xenbus.c ring = &blkif->rings[i]; blkif 130 drivers/block/xen-blkback/xenbus.c static int xen_blkif_alloc_rings(struct xen_blkif *blkif) blkif 134 drivers/block/xen-blkback/xenbus.c blkif->rings = kcalloc(blkif->nr_rings, sizeof(struct xen_blkif_ring), blkif 136 drivers/block/xen-blkback/xenbus.c if (!blkif->rings) blkif 139 drivers/block/xen-blkback/xenbus.c for (r = 0; r < blkif->nr_rings; r++) { blkif 140 drivers/block/xen-blkback/xenbus.c struct xen_blkif_ring *ring = &blkif->rings[r]; blkif 153 drivers/block/xen-blkback/xenbus.c ring->blkif = blkif; blkif 163 drivers/block/xen-blkback/xenbus.c struct xen_blkif *blkif; blkif 167 drivers/block/xen-blkback/xenbus.c blkif = kmem_cache_zalloc(xen_blkif_cachep, GFP_KERNEL); blkif 168 drivers/block/xen-blkback/xenbus.c if (!blkif) blkif 171 drivers/block/xen-blkback/xenbus.c blkif->domid = domid; blkif 172 drivers/block/xen-blkback/xenbus.c atomic_set(&blkif->refcnt, 1); blkif 173 drivers/block/xen-blkback/xenbus.c init_completion(&blkif->drain_complete); blkif 183 drivers/block/xen-blkback/xenbus.c INIT_WORK(&blkif->free_work, xen_blkif_deferred_free); blkif 185 drivers/block/xen-blkback/xenbus.c return blkif; blkif 192 drivers/block/xen-blkback/xenbus.c struct xen_blkif *blkif = ring->blkif; blkif 198 drivers/block/xen-blkback/xenbus.c err = xenbus_map_ring_valloc(blkif->be->dev, gref, nr_grefs, blkif 203 drivers/block/xen-blkback/xenbus.c switch (blkif->blk_protocol) { blkif 232 drivers/block/xen-blkback/xenbus.c err = bind_interdomain_evtchn_to_irqhandler(blkif->domid, evtchn, blkif 236 drivers/block/xen-blkback/xenbus.c xenbus_unmap_ring_vfree(blkif->be->dev, ring->blk_ring); blkif 245 drivers/block/xen-blkback/xenbus.c static int xen_blkif_disconnect(struct xen_blkif *blkif) blkif 251 drivers/block/xen-blkback/xenbus.c for (r = 0; r < blkif->nr_rings; r++) { blkif 252 drivers/block/xen-blkback/xenbus.c struct xen_blkif_ring *ring = &blkif->rings[r]; blkif 278 drivers/block/xen-blkback/xenbus.c xenbus_unmap_ring_vfree(blkif->be->dev, ring->blk_ring); blkif 305 drivers/block/xen-blkback/xenbus.c WARN_ON(i != (XEN_BLKIF_REQS_PER_PAGE * blkif->nr_ring_pages)); blkif 311 drivers/block/xen-blkback/xenbus.c blkif->nr_ring_pages = 0; blkif 316 drivers/block/xen-blkback/xenbus.c kfree(blkif->rings); blkif 317 drivers/block/xen-blkback/xenbus.c blkif->rings = NULL; blkif 318 drivers/block/xen-blkback/xenbus.c blkif->nr_rings = 0; blkif 323 drivers/block/xen-blkback/xenbus.c static void xen_blkif_free(struct xen_blkif *blkif) blkif 325 drivers/block/xen-blkback/xenbus.c WARN_ON(xen_blkif_disconnect(blkif)); blkif 326 drivers/block/xen-blkback/xenbus.c xen_vbd_free(&blkif->vbd); blkif 327 drivers/block/xen-blkback/xenbus.c kfree(blkif->be->mode); blkif 328 drivers/block/xen-blkback/xenbus.c kfree(blkif->be); blkif 331 drivers/block/xen-blkback/xenbus.c kmem_cache_free(xen_blkif_cachep, blkif); blkif 357 drivers/block/xen-blkback/xenbus.c struct xen_blkif *blkif = be->blkif; \ blkif 361 drivers/block/xen-blkback/xenbus.c if (!blkif->rings) \ blkif 364 drivers/block/xen-blkback/xenbus.c for (i = 0; i < blkif->nr_rings; i++) { \ blkif 365 drivers/block/xen-blkback/xenbus.c struct xen_blkif_ring *ring = &blkif->rings[i]; \ blkif 453 drivers/block/xen-blkback/xenbus.c static int xen_vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle, blkif 461 drivers/block/xen-blkback/xenbus.c vbd = &blkif->vbd; blkif 499 drivers/block/xen-blkback/xenbus.c handle, blkif->domid); blkif 519 drivers/block/xen-blkback/xenbus.c if (be->blkif) { blkif 520 drivers/block/xen-blkback/xenbus.c xen_blkif_disconnect(be->blkif); blkif 523 drivers/block/xen-blkback/xenbus.c xen_blkif_put(be->blkif); blkif 546 drivers/block/xen-blkback/xenbus.c struct xen_blkif *blkif = be->blkif; blkif 549 drivers/block/xen-blkback/xenbus.c struct block_device *bdev = be->blkif->vbd.bdev; blkif 574 drivers/block/xen-blkback/xenbus.c blkif->vbd.discard_secure); blkif 622 drivers/block/xen-blkback/xenbus.c be->blkif = xen_blkif_alloc(dev->otherend_id); blkif 623 drivers/block/xen-blkback/xenbus.c if (IS_ERR(be->blkif)) { blkif 624 drivers/block/xen-blkback/xenbus.c err = PTR_ERR(be->blkif); blkif 625 drivers/block/xen-blkback/xenbus.c be->blkif = NULL; blkif 645 drivers/block/xen-blkback/xenbus.c be->blkif->be = be; blkif 737 drivers/block/xen-blkback/xenbus.c err = xen_vbd_create(be->blkif, handle, major, minor, blkif 745 drivers/block/xen-blkback/xenbus.c xen_vbd_free(&be->blkif->vbd); blkif 757 drivers/block/xen-blkback/xenbus.c xen_update_blkif_status(be->blkif); blkif 795 drivers/block/xen-blkback/xenbus.c err = xen_blkif_disconnect(be->blkif); blkif 807 drivers/block/xen-blkback/xenbus.c xen_blkif_disconnect(be->blkif); blkif 810 drivers/block/xen-blkback/xenbus.c xen_update_blkif_status(be->blkif); blkif 818 drivers/block/xen-blkback/xenbus.c xen_blkif_disconnect(be->blkif); blkif 861 drivers/block/xen-blkback/xenbus.c xen_blkbk_flush_diskcache(xbt, be, be->blkif->vbd.flush_support); blkif 865 drivers/block/xen-blkback/xenbus.c xen_blkbk_barrier(xbt, be, be->blkif->vbd.flush_support); blkif 875 drivers/block/xen-blkback/xenbus.c (unsigned long long)vbd_sz(&be->blkif->vbd)); blkif 884 drivers/block/xen-blkback/xenbus.c be->blkif->vbd.type | blkif 885 drivers/block/xen-blkback/xenbus.c (be->blkif->vbd.readonly ? VDISK_READONLY : 0)); blkif 893 drivers/block/xen-blkback/xenbus.c bdev_logical_block_size(be->blkif->vbd.bdev)); blkif 900 drivers/block/xen-blkback/xenbus.c bdev_physical_block_size(be->blkif->vbd.bdev)); blkif 929 drivers/block/xen-blkback/xenbus.c struct xen_blkif *blkif = ring->blkif; blkif 930 drivers/block/xen-blkback/xenbus.c struct xenbus_device *dev = blkif->be->dev; blkif 941 drivers/block/xen-blkback/xenbus.c nr_grefs = blkif->nr_ring_pages; blkif 1027 drivers/block/xen-blkback/xenbus.c struct xen_blkif *blkif = be->blkif; blkif 1039 drivers/block/xen-blkback/xenbus.c blkif->blk_protocol = BLKIF_PROTOCOL_DEFAULT; blkif 1045 drivers/block/xen-blkback/xenbus.c blkif->blk_protocol = BLKIF_PROTOCOL_NATIVE; blkif 1047 drivers/block/xen-blkback/xenbus.c blkif->blk_protocol = BLKIF_PROTOCOL_X86_32; blkif 1049 drivers/block/xen-blkback/xenbus.c blkif->blk_protocol = BLKIF_PROTOCOL_X86_64; blkif 1056 drivers/block/xen-blkback/xenbus.c blkif->vbd.feature_gnt_persistent = pers_grants; blkif 1057 drivers/block/xen-blkback/xenbus.c blkif->vbd.overflow_max_grants = 0; blkif 1073 drivers/block/xen-blkback/xenbus.c blkif->nr_rings = requested_num_queues; blkif 1074 drivers/block/xen-blkback/xenbus.c if (xen_blkif_alloc_rings(blkif)) blkif 1078 drivers/block/xen-blkback/xenbus.c blkif->nr_rings, blkif->blk_protocol, protocol, blkif 1093 drivers/block/xen-blkback/xenbus.c blkif->nr_ring_pages = 1 << ring_page_order; blkif 1095 drivers/block/xen-blkback/xenbus.c if (blkif->nr_rings == 1) blkif 1096 drivers/block/xen-blkback/xenbus.c return read_per_ring_refs(&blkif->rings[0], dev->otherend); blkif 1105 drivers/block/xen-blkback/xenbus.c for (i = 0; i < blkif->nr_rings; i++) { blkif 1108 drivers/block/xen-blkback/xenbus.c err = read_per_ring_refs(&blkif->rings[i], xspath); blkif 153 drivers/block/xen-blkfront.c __CONST_RING_SIZE(blkif, XEN_PAGE_SIZE * (info)->nr_ring_pages) blkif 156 drivers/block/xen-blkfront.c __CONST_RING_SIZE(blkif, XEN_PAGE_SIZE * XENBUS_MAX_RING_GRANTS) blkif 275 include/xen/interface/io/blkif.h DEFINE_RING_TYPES(blkif, struct blkif_request, struct blkif_response);