disk 59 arch/m68k/emu/nfblock.c struct gendisk *disk; disk 129 arch/m68k/emu/nfblock.c dev->disk = alloc_disk(16); disk 130 arch/m68k/emu/nfblock.c if (!dev->disk) disk 133 arch/m68k/emu/nfblock.c dev->disk->major = major_num; disk 134 arch/m68k/emu/nfblock.c dev->disk->first_minor = dev_id * 16; disk 135 arch/m68k/emu/nfblock.c dev->disk->fops = &nfhd_ops; disk 136 arch/m68k/emu/nfblock.c dev->disk->private_data = dev; disk 137 arch/m68k/emu/nfblock.c sprintf(dev->disk->disk_name, "nfhd%u", dev_id); disk 138 arch/m68k/emu/nfblock.c set_capacity(dev->disk, (sector_t)blocks * (bsize / 512)); disk 139 arch/m68k/emu/nfblock.c dev->disk->queue = dev->queue; disk 141 arch/m68k/emu/nfblock.c add_disk(dev->disk); disk 189 arch/m68k/emu/nfblock.c del_gendisk(dev->disk); disk 190 arch/m68k/emu/nfblock.c put_disk(dev->disk); disk 104 arch/um/drivers/ubd_kern.c static void ubd_release(struct gendisk *disk, fmode_t mode); disk 872 arch/um/drivers/ubd_kern.c struct gendisk *disk; disk 874 arch/um/drivers/ubd_kern.c disk = alloc_disk(1 << UBD_SHIFT); disk 875 arch/um/drivers/ubd_kern.c if(disk == NULL) disk 878 arch/um/drivers/ubd_kern.c disk->major = major; disk 879 arch/um/drivers/ubd_kern.c disk->first_minor = unit << UBD_SHIFT; disk 880 arch/um/drivers/ubd_kern.c disk->fops = &ubd_blops; disk 881 arch/um/drivers/ubd_kern.c set_capacity(disk, size / 512); disk 883 arch/um/drivers/ubd_kern.c sprintf(disk->disk_name, "ubd%c", 'a' + unit); disk 885 arch/um/drivers/ubd_kern.c sprintf(disk->disk_name, "ubd_fake%d", unit); disk 897 arch/um/drivers/ubd_kern.c disk->private_data = &ubd_devs[unit]; disk 898 arch/um/drivers/ubd_kern.c disk->queue = ubd_devs[unit].queue; disk 899 arch/um/drivers/ubd_kern.c device_add_disk(parent, disk, NULL); disk 901 arch/um/drivers/ubd_kern.c *disk_out = disk; disk 1057 arch/um/drivers/ubd_kern.c struct gendisk *disk = ubd_gendisk[n]; disk 1074 arch/um/drivers/ubd_kern.c if(disk != NULL){ disk 1075 arch/um/drivers/ubd_kern.c del_gendisk(disk); disk 1076 arch/um/drivers/ubd_kern.c put_disk(disk); disk 1215 arch/um/drivers/ubd_kern.c struct gendisk *disk = bdev->bd_disk; disk 1216 arch/um/drivers/ubd_kern.c struct ubd *ubd_dev = disk->private_data; disk 1224 arch/um/drivers/ubd_kern.c disk->disk_name, ubd_dev->file, -err); disk 1229 arch/um/drivers/ubd_kern.c set_disk_ro(disk, !ubd_dev->openflags.w); disk 1242 arch/um/drivers/ubd_kern.c static void ubd_release(struct gendisk *disk, fmode_t mode) disk 1244 arch/um/drivers/ubd_kern.c struct ubd *ubd_dev = disk->private_data; disk 137 arch/xtensa/platforms/iss/simdisk.c static void simdisk_release(struct gendisk *disk, fmode_t mode) disk 139 arch/xtensa/platforms/iss/simdisk.c struct simdisk *dev = disk->private_data; disk 771 block/blk-cgroup.c struct gendisk *disk; disk 782 block/blk-cgroup.c disk = get_gendisk(MKDEV(major, minor), &part); disk 783 block/blk-cgroup.c if (!disk) disk 786 block/blk-cgroup.c put_disk_and_module(disk); disk 791 block/blk-cgroup.c return disk; disk 808 block/blk-cgroup.c __acquires(rcu) __acquires(&disk->queue->queue_lock) disk 810 block/blk-cgroup.c struct gendisk *disk; disk 815 block/blk-cgroup.c disk = blkcg_conf_get_disk(&input); disk 816 block/blk-cgroup.c if (IS_ERR(disk)) disk 817 block/blk-cgroup.c return PTR_ERR(disk); disk 819 block/blk-cgroup.c q = disk->queue; disk 881 block/blk-cgroup.c ctx->disk = disk; disk 890 block/blk-cgroup.c put_disk_and_module(disk); disk 913 block/blk-cgroup.c __releases(&ctx->disk->queue->queue_lock) __releases(rcu) disk 915 block/blk-cgroup.c spin_unlock_irq(&ctx->disk->queue->queue_lock); disk 917 block/blk-cgroup.c put_disk_and_module(ctx->disk); disk 226 block/blk-integrity.c struct gendisk *disk = container_of(kobj, struct gendisk, integrity_kobj); disk 227 block/blk-integrity.c struct blk_integrity *bi = &disk->queue->integrity; disk 238 block/blk-integrity.c struct gendisk *disk = container_of(kobj, struct gendisk, integrity_kobj); disk 239 block/blk-integrity.c struct blk_integrity *bi = &disk->queue->integrity; disk 399 block/blk-integrity.c void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) disk 401 block/blk-integrity.c struct blk_integrity *bi = &disk->queue->integrity; disk 406 block/blk-integrity.c ilog2(queue_logical_block_size(disk->queue)); disk 411 block/blk-integrity.c disk->queue->backing_dev_info->capabilities |= BDI_CAP_STABLE_WRITES; disk 422 block/blk-integrity.c void blk_integrity_unregister(struct gendisk *disk) disk 424 block/blk-integrity.c disk->queue->backing_dev_info->capabilities &= ~BDI_CAP_STABLE_WRITES; disk 425 block/blk-integrity.c memset(&disk->queue->integrity, 0, sizeof(struct blk_integrity)); disk 429 block/blk-integrity.c void blk_integrity_add(struct gendisk *disk) disk 431 block/blk-integrity.c if (kobject_init_and_add(&disk->integrity_kobj, &integrity_ktype, disk 432 block/blk-integrity.c &disk_to_dev(disk)->kobj, "%s", "integrity")) disk 435 block/blk-integrity.c kobject_uevent(&disk->integrity_kobj, KOBJ_ADD); disk 438 block/blk-integrity.c void blk_integrity_del(struct gendisk *disk) disk 440 block/blk-integrity.c kobject_uevent(&disk->integrity_kobj, KOBJ_REMOVE); disk 441 block/blk-integrity.c kobject_del(&disk->integrity_kobj); disk 442 block/blk-integrity.c kobject_put(&disk->integrity_kobj); disk 2210 block/blk-iocost.c struct gendisk *disk; disk 2217 block/blk-iocost.c disk = blkcg_conf_get_disk(&input); disk 2218 block/blk-iocost.c if (IS_ERR(disk)) disk 2219 block/blk-iocost.c return PTR_ERR(disk); disk 2221 block/blk-iocost.c ioc = q_to_ioc(disk->queue); disk 2223 block/blk-iocost.c ret = blk_iocost_init(disk->queue); disk 2226 block/blk-iocost.c ioc = q_to_ioc(disk->queue); disk 2320 block/blk-iocost.c put_disk_and_module(disk); disk 2325 block/blk-iocost.c put_disk_and_module(disk); disk 2376 block/blk-iocost.c struct gendisk *disk; disk 2383 block/blk-iocost.c disk = blkcg_conf_get_disk(&input); disk 2384 block/blk-iocost.c if (IS_ERR(disk)) disk 2385 block/blk-iocost.c return PTR_ERR(disk); disk 2387 block/blk-iocost.c ioc = q_to_ioc(disk->queue); disk 2389 block/blk-iocost.c ret = blk_iocost_init(disk->queue); disk 2392 block/blk-iocost.c ioc = q_to_ioc(disk->queue); disk 2445 block/blk-iocost.c put_disk_and_module(disk); disk 2451 block/blk-iocost.c put_disk_and_module(disk); disk 653 block/blk-settings.c void disk_stack_limits(struct gendisk *disk, struct block_device *bdev, disk 656 block/blk-settings.c struct request_queue *t = disk->queue; disk 661 block/blk-settings.c disk_name(disk, 0, top); disk 938 block/blk-sysfs.c int blk_register_queue(struct gendisk *disk) disk 941 block/blk-sysfs.c struct device *dev = disk_to_dev(disk); disk 942 block/blk-sysfs.c struct request_queue *q = disk->queue; disk 1029 block/blk-sysfs.c void blk_unregister_queue(struct gendisk *disk) disk 1031 block/blk-sysfs.c struct request_queue *q = disk->queue; disk 1055 block/blk-sysfs.c blk_mq_unregister_dev(disk_to_dev(disk), q); disk 1059 block/blk-sysfs.c blk_trace_remove_sysfs(disk_to_dev(disk)); disk 1067 block/blk-sysfs.c kobject_put(&disk_to_dev(disk)->kobj); disk 44 block/blk-timeout.c struct gendisk *disk = dev_to_disk(dev); disk 45 block/blk-timeout.c int set = test_bit(QUEUE_FLAG_FAIL_IO, &disk->queue->queue_flags); disk 53 block/blk-timeout.c struct gendisk *disk = dev_to_disk(dev); disk 57 block/blk-timeout.c struct request_queue *q = disk->queue; disk 122 block/blk-zoned.c static int blk_report_zones(struct gendisk *disk, sector_t sector, disk 125 block/blk-zoned.c struct request_queue *q = disk->queue; disk 127 block/blk-zoned.c sector_t capacity = get_capacity(disk); disk 132 block/blk-zoned.c ret = disk->fops->report_zones(disk, sector, &zones[z], &n); disk 453 block/blk-zoned.c int blk_revalidate_disk_zones(struct gendisk *disk) disk 455 block/blk-zoned.c struct request_queue *q = disk->queue; disk 456 block/blk-zoned.c unsigned int nr_zones = __blkdev_nr_zones(q, get_capacity(disk)); disk 501 block/blk-zoned.c ret = blk_report_zones(disk, sector, zones, &nrz); disk 539 block/blk-zoned.c pr_warn("%s: failed to revalidate zones\n", disk->disk_name); disk 215 block/blk.h struct hd_struct *__disk_get_part(struct gendisk *disk, int partno); disk 52 block/compat_ioctl.c static int compat_hdio_getgeo(struct gendisk *disk, struct block_device *bdev, disk 60 block/compat_ioctl.c if (!disk->fops->getgeo) disk 69 block/compat_ioctl.c ret = disk->fops->getgeo(bdev, &geo); disk 321 block/compat_ioctl.c struct gendisk *disk = bdev->bd_disk; disk 337 block/compat_ioctl.c return compat_hdio_getgeo(disk, bdev, compat_ptr(arg)); disk 418 block/compat_ioctl.c if (disk->fops->compat_ioctl) disk 419 block/compat_ioctl.c ret = disk->fops->compat_ioctl(bdev, mode, cmd, arg); disk 44 block/genhd.c static void disk_alloc_events(struct gendisk *disk); disk 45 block/genhd.c static void disk_add_events(struct gendisk *disk); disk 46 block/genhd.c static void disk_del_events(struct gendisk *disk); disk 47 block/genhd.c static void disk_release_events(struct gendisk *disk); disk 111 block/genhd.c struct hd_struct *__disk_get_part(struct gendisk *disk, int partno) disk 113 block/genhd.c struct disk_part_tbl *ptbl = rcu_dereference(disk->part_tbl); disk 134 block/genhd.c struct hd_struct *disk_get_part(struct gendisk *disk, int partno) disk 139 block/genhd.c part = __disk_get_part(disk, partno); disk 159 block/genhd.c void disk_part_iter_init(struct disk_part_iter *piter, struct gendisk *disk, disk 165 block/genhd.c ptbl = rcu_dereference(disk->part_tbl); disk 167 block/genhd.c piter->disk = disk; disk 203 block/genhd.c ptbl = rcu_dereference(piter->disk->part_tbl); disk 280 block/genhd.c struct hd_struct *disk_map_sector_rcu(struct gendisk *disk, sector_t sector) disk 286 block/genhd.c ptbl = rcu_dereference(disk->part_tbl); disk 300 block/genhd.c return &disk->part0; disk 490 block/genhd.c struct gendisk *disk = part_to_disk(part); disk 494 block/genhd.c if (part->partno < disk->minors) { disk 495 block/genhd.c *devt = MKDEV(disk->major, disk->first_minor + part->partno); disk 596 block/genhd.c static void register_disk(struct device *parent, struct gendisk *disk, disk 599 block/genhd.c struct device *ddev = disk_to_dev(disk); disk 607 block/genhd.c dev_set_name(ddev, "%s", disk->disk_name); disk 634 block/genhd.c disk->part0.holder_dir = kobject_create_and_add("holders", &ddev->kobj); disk 635 block/genhd.c disk->slave_dir = kobject_create_and_add("slaves", &ddev->kobj); disk 637 block/genhd.c if (disk->flags & GENHD_FL_HIDDEN) { disk 643 block/genhd.c if (!disk_part_scan_enabled(disk)) disk 647 block/genhd.c if (!get_capacity(disk)) disk 650 block/genhd.c bdev = bdget_disk(disk, 0); disk 666 block/genhd.c disk_part_iter_init(&piter, disk, 0); disk 671 block/genhd.c if (disk->queue->backing_dev_info->dev) { disk 673 block/genhd.c &disk->queue->backing_dev_info->dev->kobj, disk 691 block/genhd.c static void __device_add_disk(struct device *parent, struct gendisk *disk, disk 705 block/genhd.c elevator_init_mq(disk->queue); disk 711 block/genhd.c WARN_ON(disk->minors && !(disk->major || disk->first_minor)); disk 712 block/genhd.c WARN_ON(!disk->minors && disk 713 block/genhd.c !(disk->flags & (GENHD_FL_EXT_DEVT | GENHD_FL_HIDDEN))); disk 715 block/genhd.c disk->flags |= GENHD_FL_UP; disk 717 block/genhd.c retval = blk_alloc_devt(&disk->part0, &devt); disk 722 block/genhd.c disk->major = MAJOR(devt); disk 723 block/genhd.c disk->first_minor = MINOR(devt); disk 725 block/genhd.c disk_alloc_events(disk); disk 727 block/genhd.c if (disk->flags & GENHD_FL_HIDDEN) { disk 732 block/genhd.c disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO; disk 733 block/genhd.c disk->flags |= GENHD_FL_NO_PART_SCAN; disk 738 block/genhd.c disk_to_dev(disk)->devt = devt; disk 739 block/genhd.c ret = bdi_register_owner(disk->queue->backing_dev_info, disk 740 block/genhd.c disk_to_dev(disk)); disk 742 block/genhd.c blk_register_region(disk_devt(disk), disk->minors, NULL, disk 743 block/genhd.c exact_match, exact_lock, disk); disk 745 block/genhd.c register_disk(parent, disk, groups); disk 747 block/genhd.c blk_register_queue(disk); disk 753 block/genhd.c WARN_ON_ONCE(!blk_get_queue(disk->queue)); disk 755 block/genhd.c disk_add_events(disk); disk 756 block/genhd.c blk_integrity_add(disk); disk 759 block/genhd.c void device_add_disk(struct device *parent, struct gendisk *disk, disk 763 block/genhd.c __device_add_disk(parent, disk, groups, true); disk 767 block/genhd.c void device_add_disk_no_queue_reg(struct device *parent, struct gendisk *disk) disk 769 block/genhd.c __device_add_disk(parent, disk, NULL, false); disk 773 block/genhd.c void del_gendisk(struct gendisk *disk) disk 778 block/genhd.c blk_integrity_del(disk); disk 779 block/genhd.c disk_del_events(disk); disk 785 block/genhd.c down_write(&disk->lookup_sem); disk 787 block/genhd.c disk_part_iter_init(&piter, disk, disk 790 block/genhd.c invalidate_partition(disk, part->partno); disk 792 block/genhd.c delete_partition(disk, part->partno); disk 796 block/genhd.c invalidate_partition(disk, 0); disk 797 block/genhd.c bdev_unhash_inode(disk_devt(disk)); disk 798 block/genhd.c set_capacity(disk, 0); disk 799 block/genhd.c disk->flags &= ~GENHD_FL_UP; disk 800 block/genhd.c up_write(&disk->lookup_sem); disk 802 block/genhd.c if (!(disk->flags & GENHD_FL_HIDDEN)) disk 803 block/genhd.c sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi"); disk 804 block/genhd.c if (disk->queue) { disk 809 block/genhd.c if (!(disk->flags & GENHD_FL_HIDDEN)) disk 810 block/genhd.c bdi_unregister(disk->queue->backing_dev_info); disk 811 block/genhd.c blk_unregister_queue(disk); disk 816 block/genhd.c if (!(disk->flags & GENHD_FL_HIDDEN)) disk 817 block/genhd.c blk_unregister_region(disk_devt(disk), disk->minors); disk 824 block/genhd.c blk_invalidate_devt(disk_devt(disk)); disk 826 block/genhd.c kobject_put(disk->part0.holder_dir); disk 827 block/genhd.c kobject_put(disk->slave_dir); disk 829 block/genhd.c part_stat_set_all(&disk->part0, 0); disk 830 block/genhd.c disk->part0.stamp = 0; disk 832 block/genhd.c sysfs_remove_link(block_depr, dev_name(disk_to_dev(disk))); disk 833 block/genhd.c pm_runtime_set_memalloc_noio(disk_to_dev(disk), false); disk 834 block/genhd.c device_del(disk_to_dev(disk)); disk 843 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 845 block/genhd.c if (!disk->bb) disk 848 block/genhd.c return badblocks_show(disk->bb, page, 0); disk 855 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 857 block/genhd.c if (!disk->bb) disk 860 block/genhd.c return badblocks_store(disk->bb, page, len, 0); disk 873 block/genhd.c struct gendisk *disk = NULL; disk 880 block/genhd.c disk = dev_to_disk(kobj_to_dev(kobj)); disk 888 block/genhd.c disk = part_to_disk(part); disk 893 block/genhd.c if (!disk) disk 900 block/genhd.c down_read(&disk->lookup_sem); disk 901 block/genhd.c if (unlikely((disk->flags & GENHD_FL_HIDDEN) || disk 902 block/genhd.c !(disk->flags & GENHD_FL_UP))) { disk 903 block/genhd.c up_read(&disk->lookup_sem); disk 904 block/genhd.c put_disk_and_module(disk); disk 905 block/genhd.c disk = NULL; disk 907 block/genhd.c up_read(&disk->lookup_sem); disk 909 block/genhd.c return disk; disk 926 block/genhd.c struct block_device *bdget_disk(struct gendisk *disk, int partno) disk 931 block/genhd.c part = disk_get_part(disk, partno); disk 952 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 962 block/genhd.c if (get_capacity(disk) == 0 || disk 963 block/genhd.c (disk->flags & GENHD_FL_SUPPRESS_PARTITION_INFO)) disk 971 block/genhd.c disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0); disk 973 block/genhd.c bool is_part0 = part == &disk->part0; disk 978 block/genhd.c , disk_name(disk, part->partno, name_buf), disk 1118 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1120 block/genhd.c return sprintf(buf, "%d\n", disk->minors); disk 1126 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1128 block/genhd.c return sprintf(buf, "%d\n", disk_max_parts(disk)); disk 1134 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1137 block/genhd.c (disk->flags & GENHD_FL_REMOVABLE ? 1 : 0)); disk 1143 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1146 block/genhd.c (disk->flags & GENHD_FL_HIDDEN ? 1 : 0)); disk 1152 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1154 block/genhd.c return sprintf(buf, "%d\n", get_disk_ro(disk) ? 1 : 0); disk 1160 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1162 block/genhd.c return sprintf(buf, "%x\n", disk->flags); disk 1169 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1171 block/genhd.c return sprintf(buf, "%d\n", queue_alignment_offset(disk->queue)); disk 1178 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1180 block/genhd.c return sprintf(buf, "%d\n", queue_discard_alignment(disk->queue)); disk 1229 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1231 block/genhd.c if (a == &dev_attr_badblocks.attr && !disk->bb) disk 1257 block/genhd.c static void disk_replace_part_tbl(struct gendisk *disk, disk 1261 block/genhd.c rcu_dereference_protected(disk->part_tbl, 1); disk 1263 block/genhd.c rcu_assign_pointer(disk->part_tbl, new_ptbl); disk 1286 block/genhd.c int disk_expand_part_tbl(struct gendisk *disk, int partno) disk 1289 block/genhd.c rcu_dereference_protected(disk->part_tbl, 1); disk 1303 block/genhd.c if (disk_max_parts(disk) && target > disk_max_parts(disk)) disk 1310 block/genhd.c disk->node_id); disk 1319 block/genhd.c disk_replace_part_tbl(disk, new_ptbl); disk 1325 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1328 block/genhd.c disk_release_events(disk); disk 1329 block/genhd.c kfree(disk->random); disk 1330 block/genhd.c disk_replace_part_tbl(disk, NULL); disk 1331 block/genhd.c hd_free_part(&disk->part0); disk 1332 block/genhd.c if (disk->queue) disk 1333 block/genhd.c blk_put_queue(disk->queue); disk 1334 block/genhd.c kfree(disk); disk 1343 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1345 block/genhd.c if (disk->devnode) disk 1346 block/genhd.c return disk->devnode(disk, mode); disk 1437 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1443 block/genhd.c if (partno < disk->minors) { disk 1451 block/genhd.c part = disk_get_part(disk, partno); disk 1466 block/genhd.c struct gendisk *disk; disk 1476 block/genhd.c disk = kzalloc_node(sizeof(struct gendisk), GFP_KERNEL, node_id); disk 1477 block/genhd.c if (disk) { disk 1478 block/genhd.c if (!init_part_stats(&disk->part0)) { disk 1479 block/genhd.c kfree(disk); disk 1482 block/genhd.c init_rwsem(&disk->lookup_sem); disk 1483 block/genhd.c disk->node_id = node_id; disk 1484 block/genhd.c if (disk_expand_part_tbl(disk, 0)) { disk 1485 block/genhd.c free_part_stats(&disk->part0); disk 1486 block/genhd.c kfree(disk); disk 1489 block/genhd.c ptbl = rcu_dereference_protected(disk->part_tbl, 1); disk 1490 block/genhd.c rcu_assign_pointer(ptbl->part[0], &disk->part0); disk 1501 block/genhd.c seqcount_init(&disk->part0.nr_sects_seq); disk 1502 block/genhd.c if (hd_ref_init(&disk->part0)) { disk 1503 block/genhd.c hd_free_part(&disk->part0); disk 1504 block/genhd.c kfree(disk); disk 1508 block/genhd.c disk->minors = minors; disk 1509 block/genhd.c rand_initialize_disk(disk); disk 1510 block/genhd.c disk_to_dev(disk)->class = &block_class; disk 1511 block/genhd.c disk_to_dev(disk)->type = &disk_type; disk 1512 block/genhd.c device_initialize(disk_to_dev(disk)); disk 1514 block/genhd.c return disk; disk 1518 block/genhd.c struct kobject *get_disk_and_module(struct gendisk *disk) disk 1523 block/genhd.c if (!disk->fops) disk 1525 block/genhd.c owner = disk->fops->owner; disk 1528 block/genhd.c kobj = kobject_get_unless_zero(&disk_to_dev(disk)->kobj); disk 1538 block/genhd.c void put_disk(struct gendisk *disk) disk 1540 block/genhd.c if (disk) disk 1541 block/genhd.c kobject_put(&disk_to_dev(disk)->kobj); disk 1549 block/genhd.c void put_disk_and_module(struct gendisk *disk) disk 1551 block/genhd.c if (disk) { disk 1552 block/genhd.c struct module *owner = disk->fops->owner; disk 1554 block/genhd.c put_disk(disk); disk 1577 block/genhd.c void set_disk_ro(struct gendisk *disk, int flag) disk 1582 block/genhd.c if (disk->part0.policy != flag) { disk 1583 block/genhd.c set_disk_ro_uevent(disk, flag); disk 1584 block/genhd.c disk->part0.policy = flag; disk 1587 block/genhd.c disk_part_iter_init(&piter, disk, DISK_PITER_INCL_EMPTY); disk 1604 block/genhd.c int invalidate_partition(struct gendisk *disk, int partno) disk 1607 block/genhd.c struct block_device *bdev = bdget_disk(disk, partno); disk 1623 block/genhd.c struct gendisk *disk; /* the associated disk */ disk 1652 block/genhd.c static unsigned long disk_events_poll_jiffies(struct gendisk *disk) disk 1654 block/genhd.c struct disk_events *ev = disk->ev; disk 1663 block/genhd.c else if (disk->event_flags & DISK_EVENT_FLAG_POLL) disk 1684 block/genhd.c void disk_block_events(struct gendisk *disk) disk 1686 block/genhd.c struct disk_events *ev = disk->ev; disk 1704 block/genhd.c cancel_delayed_work_sync(&disk->ev->dwork); disk 1709 block/genhd.c static void __disk_unblock_events(struct gendisk *disk, bool check_now) disk 1711 block/genhd.c struct disk_events *ev = disk->ev; disk 1723 block/genhd.c intv = disk_events_poll_jiffies(disk); disk 1744 block/genhd.c void disk_unblock_events(struct gendisk *disk) disk 1746 block/genhd.c if (disk->ev) disk 1747 block/genhd.c __disk_unblock_events(disk, false); disk 1762 block/genhd.c void disk_flush_events(struct gendisk *disk, unsigned int mask) disk 1764 block/genhd.c struct disk_events *ev = disk->ev; disk 1788 block/genhd.c unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask) disk 1790 block/genhd.c const struct block_device_operations *bdops = disk->fops; disk 1791 block/genhd.c struct disk_events *ev = disk->ev; disk 1798 block/genhd.c bdops->media_changed && bdops->media_changed(disk)) disk 1803 block/genhd.c disk_block_events(disk); disk 1820 block/genhd.c __disk_unblock_events(disk, ev->clearing ? true : false); disk 1847 block/genhd.c struct gendisk *disk = ev->disk; disk 1855 block/genhd.c events = disk->fops->check_events(disk, clearing); disk 1864 block/genhd.c intv = disk_events_poll_jiffies(disk); disk 1878 block/genhd.c if ((events & disk->events & (1 << i)) && disk 1879 block/genhd.c (disk->event_flags & DISK_EVENT_FLAG_UEVENT)) disk 1883 block/genhd.c kobject_uevent_env(&disk_to_dev(disk)->kobj, KOBJ_CHANGE, envp); disk 1915 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1917 block/genhd.c if (!(disk->event_flags & DISK_EVENT_FLAG_UEVENT)) disk 1920 block/genhd.c return __disk_events_show(disk->events, buf); disk 1933 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1935 block/genhd.c if (!disk->ev) disk 1938 block/genhd.c return sprintf(buf, "%ld\n", disk->ev->poll_msecs); disk 1945 block/genhd.c struct gendisk *disk = dev_to_disk(dev); disk 1954 block/genhd.c if (!disk->ev) disk 1957 block/genhd.c disk_block_events(disk); disk 1958 block/genhd.c disk->ev->poll_msecs = intv; disk 1959 block/genhd.c __disk_unblock_events(disk, true); disk 1996 block/genhd.c disk_flush_events(ev->disk, 0); disk 2017 block/genhd.c static void disk_alloc_events(struct gendisk *disk) disk 2021 block/genhd.c if (!disk->fops->check_events || !disk->events) disk 2026 block/genhd.c pr_warn("%s: failed to initialize events\n", disk->disk_name); disk 2031 block/genhd.c ev->disk = disk; disk 2038 block/genhd.c disk->ev = ev; disk 2041 block/genhd.c static void disk_add_events(struct gendisk *disk) disk 2044 block/genhd.c if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_events_attrs) < 0) disk 2046 block/genhd.c disk->disk_name); disk 2048 block/genhd.c if (!disk->ev) disk 2052 block/genhd.c list_add_tail(&disk->ev->node, &disk_events); disk 2059 block/genhd.c __disk_unblock_events(disk, true); disk 2062 block/genhd.c static void disk_del_events(struct gendisk *disk) disk 2064 block/genhd.c if (disk->ev) { disk 2065 block/genhd.c disk_block_events(disk); disk 2068 block/genhd.c list_del_init(&disk->ev->node); disk 2072 block/genhd.c sysfs_remove_files(&disk_to_dev(disk)->kobj, disk_events_attrs); disk 2075 block/genhd.c static void disk_release_events(struct gendisk *disk) disk 2078 block/genhd.c WARN_ON_ONCE(disk->ev && disk->ev->block != 1); disk 2079 block/genhd.c kfree(disk->ev); disk 17 block/ioctl.c struct gendisk *disk; disk 31 block/ioctl.c disk = bdev->bd_disk; disk 56 block/ioctl.c disk_part_iter_init(&piter, disk, disk 69 block/ioctl.c part = add_partition(disk, partno, start, length, disk 74 block/ioctl.c part = disk_get_part(disk, partno); disk 94 block/ioctl.c delete_partition(disk, partno); disk 112 block/ioctl.c part = disk_get_part(disk, partno); disk 130 block/ioctl.c disk_part_iter_init(&piter, disk, disk 165 block/ioctl.c struct gendisk *disk = bdev->bd_disk; disk 167 block/ioctl.c if (!disk_part_scan_enabled(disk) || bdev != bdev->bd_contains) disk 174 block/ioctl.c return rescan_partitions(disk, bdev); disk 301 block/ioctl.c struct gendisk *disk = bdev->bd_disk; disk 303 block/ioctl.c if (disk->fops->ioctl) disk 304 block/ioctl.c return disk->fops->ioctl(bdev, mode, cmd, arg); disk 462 block/ioctl.c struct gendisk *disk = bdev->bd_disk; disk 468 block/ioctl.c if (!disk->fops->getgeo) disk 477 block/ioctl.c ret = disk->fops->getgeo(bdev, &geo); disk 270 block/partition-generic.c void delete_partition(struct gendisk *disk, int partno) disk 273 block/partition-generic.c rcu_dereference_protected(disk->part_tbl, 1); disk 309 block/partition-generic.c struct hd_struct *add_partition(struct gendisk *disk, int partno, disk 315 block/partition-generic.c struct device *ddev = disk_to_dev(disk); disk 321 block/partition-generic.c err = disk_expand_part_tbl(disk, partno); disk 324 block/partition-generic.c ptbl = rcu_dereference_protected(disk->part_tbl, 1); disk 343 block/partition-generic.c queue_limit_alignment_offset(&disk->queue->limits, start); disk 345 block/partition-generic.c queue_limit_discard_alignment(&disk->queue->limits, start); disk 348 block/partition-generic.c p->policy = get_disk_ro(disk); disk 351 block/partition-generic.c struct partition_meta_info *pinfo = alloc_part_info(disk); disk 426 block/partition-generic.c static bool disk_unlock_native_capacity(struct gendisk *disk) disk 428 block/partition-generic.c const struct block_device_operations *bdops = disk->fops; disk 431 block/partition-generic.c !(disk->flags & GENHD_FL_NATIVE_CAPACITY)) { disk 433 block/partition-generic.c bdops->unlock_native_capacity(disk); disk 434 block/partition-generic.c disk->flags |= GENHD_FL_NATIVE_CAPACITY; disk 442 block/partition-generic.c static int drop_partitions(struct gendisk *disk, struct block_device *bdev) disk 450 block/partition-generic.c res = invalidate_partition(disk, 0); disk 454 block/partition-generic.c disk_part_iter_init(&piter, disk, DISK_PITER_INCL_EMPTY); disk 456 block/partition-generic.c delete_partition(disk, part->partno); disk 462 block/partition-generic.c static bool part_zone_aligned(struct gendisk *disk, disk 493 block/partition-generic.c if ((from + size) < get_capacity(disk)) { disk 503 block/partition-generic.c if ((from + size) < get_capacity(disk) && disk 512 block/partition-generic.c int rescan_partitions(struct gendisk *disk, struct block_device *bdev) disk 523 block/partition-generic.c res = drop_partitions(disk, bdev); disk 527 block/partition-generic.c if (disk->fops->revalidate_disk) disk 528 block/partition-generic.c disk->fops->revalidate_disk(disk); disk 529 block/partition-generic.c check_disk_size_change(disk, bdev, true); disk 531 block/partition-generic.c if (!get_capacity(disk) || !(state = check_partition(disk, bdev))) disk 541 block/partition-generic.c disk->disk_name); disk 542 block/partition-generic.c if (disk_unlock_native_capacity(disk)) disk 555 block/partition-generic.c disk->disk_name); disk 556 block/partition-generic.c if (disk_unlock_native_capacity(disk)) disk 561 block/partition-generic.c kobject_uevent(&disk_to_dev(disk)->kobj, KOBJ_CHANGE); disk 571 block/partition-generic.c disk_expand_part_tbl(disk, highest); disk 582 block/partition-generic.c if (from >= get_capacity(disk)) { disk 585 block/partition-generic.c disk->disk_name, p, (unsigned long long) from); disk 586 block/partition-generic.c if (disk_unlock_native_capacity(disk)) disk 591 block/partition-generic.c if (from + size > get_capacity(disk)) { disk 594 block/partition-generic.c disk->disk_name, p, (unsigned long long) size); disk 596 block/partition-generic.c if (disk_unlock_native_capacity(disk)) { disk 606 block/partition-generic.c size = get_capacity(disk) - from; disk 617 block/partition-generic.c !part_zone_aligned(disk, bdev, from, size)) { disk 620 block/partition-generic.c disk->disk_name, p, (unsigned long long) from, disk 625 block/partition-generic.c part = add_partition(disk, p, from, size, disk 630 block/partition-generic.c disk->disk_name, p, -PTR_ERR(part)); disk 642 block/partition-generic.c int invalidate_partitions(struct gendisk *disk, struct block_device *bdev) disk 649 block/partition-generic.c res = drop_partitions(disk, bdev); disk 653 block/partition-generic.c set_capacity(disk, 0); disk 654 block/partition-generic.c check_disk_size_change(disk, bdev, false); disk 657 block/partition-generic.c kobject_uevent(&disk_to_dev(disk)->kobj, KOBJ_CHANGE); disk 546 block/partitions/ldm.c if (uuid_equal(&v->vblk.disk.disk_id, &ldb->ph.disk_id)) disk 575 block/partitions/ldm.c struct vblk *disk; disk 581 block/partitions/ldm.c disk = ldm_get_disk_objid (ldb); disk 582 block/partitions/ldm.c if (!disk) { disk 594 block/partitions/ldm.c if (part->disk_id != disk->obj_id) disk 859 block/partitions/ldm.c struct vblk_disk *disk; disk 875 block/partitions/ldm.c disk = &vb->vblk.disk; disk 876 block/partitions/ldm.c ldm_get_vstr (buffer + 0x18 + r_diskid, disk->alt_name, disk 877 block/partitions/ldm.c sizeof (disk->alt_name)); disk 878 block/partitions/ldm.c if (uuid_parse(buffer + 0x19 + r_name, &disk->disk_id)) disk 898 block/partitions/ldm.c struct vblk_disk *disk; disk 912 block/partitions/ldm.c disk = &vb->vblk.disk; disk 913 block/partitions/ldm.c uuid_copy(&disk->disk_id, (uuid_t *)(buffer + 0x18 + r_name)); disk 178 block/partitions/ldm.h struct vblk_disk disk; disk 404 block/scsi_ioctl.c int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, disk 493 block/scsi_ioctl.c blk_execute_rq(q, disk, rq, 0); disk 199 drivers/block/amiflop.c int disk; /* disk in drive (-1 == unknown) */ disk 931 drivers/block/amiflop.c static unsigned long *putsec(int disk, unsigned long *raw, int cnt) disk 936 drivers/block/amiflop.c disk&=3; disk 942 drivers/block/amiflop.c hdr.track = unit[disk].track; disk 944 drivers/block/amiflop.c hdr.ord = unit[disk].dtype->sects * unit[disk].type->sect_mult - cnt; disk 949 drivers/block/amiflop.c hdr.datachk = checksum((ulong *)(unit[disk].trackbuf+cnt*512), 512); disk 959 drivers/block/amiflop.c encode_block(raw, (ulong *)(unit[disk].trackbuf+cnt*512), 512); disk 965 drivers/block/amiflop.c static void amiga_write(int disk) disk 970 drivers/block/amiflop.c disk&=3; disk 972 drivers/block/amiflop.c for (cnt = 0; cnt < 415 * unit[disk].type->sect_mult; cnt++) disk 976 drivers/block/amiflop.c for (cnt = 0; cnt < unit[disk].dtype->sects * unit[disk].type->sect_mult; cnt++) disk 977 drivers/block/amiflop.c ptr = putsec (disk, ptr, cnt); disk 1322 drivers/block/amiflop.c static void dos_write(int disk) disk 1328 drivers/block/amiflop.c disk&=3; disk 1334 drivers/block/amiflop.c if (unit[disk].type->sect_mult==2) /* check for HD-Disks */ disk 1349 drivers/block/amiflop.c for(cnt = 0; cnt < unit[disk].dtype->sects * unit[disk].type->sect_mult; cnt++) disk 1350 drivers/block/amiflop.c ptr=ms_putsec(disk,ptr,cnt); disk 1646 drivers/block/amiflop.c unit[drive].disk = -1; disk 1707 drivers/block/amiflop.c static void floppy_release(struct gendisk *disk, fmode_t mode) disk 1709 drivers/block/amiflop.c struct amiga_floppy_struct *p = disk->private_data; disk 1734 drivers/block/amiflop.c static unsigned amiga_check_events(struct gendisk *disk, unsigned int clearing) disk 1736 drivers/block/amiflop.c struct amiga_floppy_struct *p = disk->private_data; disk 1777 drivers/block/amiflop.c struct gendisk *disk; disk 1779 drivers/block/amiflop.c disk = alloc_disk(1); disk 1780 drivers/block/amiflop.c if (!disk) disk 1783 drivers/block/amiflop.c disk->queue = blk_mq_init_sq_queue(&unit[drive].tag_set, &amiflop_mq_ops, disk 1785 drivers/block/amiflop.c if (IS_ERR(disk->queue)) { disk 1786 drivers/block/amiflop.c disk->queue = NULL; disk 1794 drivers/block/amiflop.c return disk; disk 1797 drivers/block/amiflop.c blk_cleanup_queue(disk->queue); disk 1798 drivers/block/amiflop.c disk->queue = NULL; disk 1801 drivers/block/amiflop.c put_disk(disk); disk 1815 drivers/block/amiflop.c struct gendisk *disk; disk 1820 drivers/block/amiflop.c disk = fd_alloc_disk(drive); disk 1821 drivers/block/amiflop.c if (!disk) { disk 1826 drivers/block/amiflop.c unit[drive].gendisk = disk; disk 1830 drivers/block/amiflop.c disk->major = FLOPPY_MAJOR; disk 1831 drivers/block/amiflop.c disk->first_minor = drive; disk 1832 drivers/block/amiflop.c disk->fops = &floppy_fops; disk 1833 drivers/block/amiflop.c disk->events = DISK_EVENT_MEDIA_CHANGE; disk 1834 drivers/block/amiflop.c sprintf(disk->disk_name, "fd%d", drive); disk 1835 drivers/block/amiflop.c disk->private_data = &unit[drive]; disk 1836 drivers/block/amiflop.c set_capacity(disk, 880*2); disk 1837 drivers/block/amiflop.c add_disk(disk); disk 37 drivers/block/aoe/aoeblk.c struct gendisk *disk = dev_to_disk(dev); disk 38 drivers/block/aoe/aoeblk.c struct aoedev *d = disk->private_data; disk 50 drivers/block/aoe/aoeblk.c struct gendisk *disk = dev_to_disk(dev); disk 51 drivers/block/aoe/aoeblk.c struct aoedev *d = disk->private_data; disk 61 drivers/block/aoe/aoeblk.c struct gendisk *disk = dev_to_disk(dev); disk 62 drivers/block/aoe/aoeblk.c struct aoedev *d = disk->private_data; disk 99 drivers/block/aoe/aoeblk.c struct gendisk *disk = dev_to_disk(dev); disk 100 drivers/block/aoe/aoeblk.c struct aoedev *d = disk->private_data; disk 107 drivers/block/aoe/aoeblk.c struct gendisk *disk = dev_to_disk(dev); disk 108 drivers/block/aoe/aoeblk.c struct aoedev *d = disk->private_data; disk 248 drivers/block/aoe/aoeblk.c aoeblk_release(struct gendisk *disk, fmode_t mode) disk 250 drivers/block/aoe/aoeblk.c struct aoedev *d = disk->private_data; disk 300 drivers/block/ataflop.c struct gendisk *disk; disk 448 drivers/block/ataflop.c static void floppy_release(struct gendisk *disk, fmode_t mode); disk 726 drivers/block/ataflop.c struct request_queue *q = unit[drive].disk->queue; disk 1157 drivers/block/ataflop.c set_capacity(unit[SelectedDrive].disk, disk 1172 drivers/block/ataflop.c set_capacity(unit[SelectedDrive].disk, disk 1406 drivers/block/ataflop.c static unsigned int floppy_check_events(struct gendisk *disk, disk 1409 drivers/block/ataflop.c struct atari_floppy_struct *p = disk->private_data; disk 1429 drivers/block/ataflop.c static int floppy_revalidate(struct gendisk *disk) disk 1431 drivers/block/ataflop.c struct atari_floppy_struct *p = disk->private_data; disk 1518 drivers/block/ataflop.c set_capacity(floppy->disk, UDT->blocks); disk 1536 drivers/block/ataflop.c set_capacity(floppy->disk, UDT->blocks); disk 1562 drivers/block/ataflop.c struct gendisk *disk = bdev->bd_disk; disk 1563 drivers/block/ataflop.c struct atari_floppy_struct *floppy = disk->private_data; disk 1624 drivers/block/ataflop.c if (floppy_check_events(disk, 0)) disk 1625 drivers/block/ataflop.c floppy_revalidate(disk); disk 1661 drivers/block/ataflop.c set_capacity(floppy->disk, UDT->blocks); disk 1705 drivers/block/ataflop.c set_capacity(floppy->disk, UDT->blocks); disk 1728 drivers/block/ataflop.c set_capacity(floppy->disk, MAX_DISK_SIZE * 2); disk 1937 drivers/block/ataflop.c static void floppy_release(struct gendisk *disk, fmode_t mode) disk 1939 drivers/block/ataflop.c struct atari_floppy_struct *p = disk->private_data; disk 1971 drivers/block/ataflop.c return get_disk_and_module(unit[drive].disk); disk 1987 drivers/block/ataflop.c unit[i].disk = alloc_disk(1); disk 1988 drivers/block/ataflop.c if (!unit[i].disk) { disk 1993 drivers/block/ataflop.c unit[i].disk->queue = blk_mq_init_sq_queue(&unit[i].tag_set, disk 1996 drivers/block/ataflop.c if (IS_ERR(unit[i].disk->queue)) { disk 1997 drivers/block/ataflop.c put_disk(unit[i].disk); disk 1998 drivers/block/ataflop.c ret = PTR_ERR(unit[i].disk->queue); disk 1999 drivers/block/ataflop.c unit[i].disk->queue = NULL; disk 2029 drivers/block/ataflop.c unit[i].disk->major = FLOPPY_MAJOR; disk 2030 drivers/block/ataflop.c unit[i].disk->first_minor = i; disk 2031 drivers/block/ataflop.c sprintf(unit[i].disk->disk_name, "fd%d", i); disk 2032 drivers/block/ataflop.c unit[i].disk->fops = &floppy_fops; disk 2033 drivers/block/ataflop.c unit[i].disk->events = DISK_EVENT_MEDIA_CHANGE; disk 2034 drivers/block/ataflop.c unit[i].disk->private_data = &unit[i]; disk 2035 drivers/block/ataflop.c set_capacity(unit[i].disk, MAX_DISK_SIZE * 2); disk 2036 drivers/block/ataflop.c add_disk(unit[i].disk); disk 2051 drivers/block/ataflop.c struct gendisk *disk = unit[i].disk; disk 2053 drivers/block/ataflop.c blk_cleanup_queue(disk->queue); disk 2055 drivers/block/ataflop.c put_disk(unit[i].disk); disk 2106 drivers/block/ataflop.c del_gendisk(unit[i].disk); disk 2107 drivers/block/ataflop.c blk_cleanup_queue(unit[i].disk->queue); disk 2109 drivers/block/ataflop.c put_disk(unit[i].disk); disk 371 drivers/block/brd.c struct gendisk *disk; disk 394 drivers/block/brd.c disk = brd->brd_disk = alloc_disk(max_part); disk 395 drivers/block/brd.c if (!disk) disk 397 drivers/block/brd.c disk->major = RAMDISK_MAJOR; disk 398 drivers/block/brd.c disk->first_minor = i * max_part; disk 399 drivers/block/brd.c disk->fops = &brd_fops; disk 400 drivers/block/brd.c disk->private_data = brd; disk 401 drivers/block/brd.c disk->flags = GENHD_FL_EXT_DEVT; disk 402 drivers/block/brd.c sprintf(disk->disk_name, "ram%d", i); disk 403 drivers/block/brd.c set_capacity(disk, rd_size * 2); disk 88 drivers/block/drbd/drbd_actlog.c device->state.disk <= D_FAILED); disk 151 drivers/block/drbd/drbd_actlog.c if (op != REQ_OP_WRITE && device->state.disk == D_DISKLESS && device->ldev == NULL) disk 409 drivers/block/drbd/drbd_actlog.c drbd_disk_str(device->state.disk)); disk 414 drivers/block/drbd/drbd_actlog.c if (device->state.disk < D_INCONSISTENT) { disk 417 drivers/block/drbd/drbd_actlog.c drbd_disk_str(device->state.disk)); disk 1760 drivers/block/drbd/drbd_int.h if (device->state.disk > D_INCONSISTENT) disk 1761 drivers/block/drbd/drbd_int.h _drbd_set_state(_NS(device, disk, D_INCONSISTENT), CS_HARD, NULL); disk 1792 drivers/block/drbd/drbd_int.h if (device->state.disk > D_FAILED) { disk 1793 drivers/block/drbd/drbd_int.h _drbd_set_state(_NS(device, disk, D_FAILED), CS_HARD, NULL); disk 2120 drivers/block/drbd/drbd_int.h enum drbd_disk_state disk_state = device->state.disk; disk 2150 drivers/block/drbd/drbd_int.h if (device->state.disk == D_DISKLESS) disk 2154 drivers/block/drbd/drbd_int.h io_allowed = (device->state.disk >= mins); disk 2227 drivers/block/drbd/drbd_int.h switch ((enum drbd_disk_state)s.disk) { disk 162 drivers/block/drbd/drbd_main.c io_allowed = (device->state.disk >= mins); disk 854 drivers/block/drbd/drbd_main.c uuid_flags |= device->new_state_tmp.disk == D_INCONSISTENT ? 4 : 0; disk 896 drivers/block/drbd/drbd_main.c D_ASSERT(device, device->state.disk == D_UP_TO_DATE); disk 1967 drivers/block/drbd/drbd_main.c .disk = D_DISKLESS, disk 2781 drivers/block/drbd/drbd_main.c struct gendisk *disk; disk 2810 drivers/block/drbd/drbd_main.c disk = alloc_disk(1); disk 2811 drivers/block/drbd/drbd_main.c if (!disk) disk 2813 drivers/block/drbd/drbd_main.c device->vdisk = disk; disk 2815 drivers/block/drbd/drbd_main.c set_disk_ro(disk, true); disk 2817 drivers/block/drbd/drbd_main.c disk->queue = q; disk 2818 drivers/block/drbd/drbd_main.c disk->major = DRBD_MAJOR; disk 2819 drivers/block/drbd/drbd_main.c disk->first_minor = minor; disk 2820 drivers/block/drbd/drbd_main.c disk->fops = &drbd_ops; disk 2821 drivers/block/drbd/drbd_main.c sprintf(disk->disk_name, "drbd%d", minor); disk 2822 drivers/block/drbd/drbd_main.c disk->private_data = device; disk 2889 drivers/block/drbd/drbd_main.c add_disk(disk); disk 2924 drivers/block/drbd/drbd_main.c put_disk(disk); disk 3314 drivers/block/drbd/drbd_main.c if (device->state.disk != D_DISKLESS) disk 548 drivers/block/drbd/drbd_nl.c mask.disk = D_MASK; disk 549 drivers/block/drbd/drbd_nl.c val.disk = D_OUTDATED; disk 655 drivers/block/drbd/drbd_nl.c (device->state.disk < D_UP_TO_DATE && disk 656 drivers/block/drbd/drbd_nl.c device->state.disk >= D_INCONSISTENT)) { disk 657 drivers/block/drbd/drbd_nl.c mask.disk = D_MASK; disk 658 drivers/block/drbd/drbd_nl.c val.disk = D_UP_TO_DATE; disk 664 drivers/block/drbd/drbd_nl.c device->state.disk == D_CONSISTENT && mask.pdsk == 0) { disk 668 drivers/block/drbd/drbd_nl.c val.disk = D_UP_TO_DATE; disk 669 drivers/block/drbd/drbd_nl.c mask.disk = D_MASK; disk 1822 drivers/block/drbd/drbd_nl.c if (device->state.disk > D_DISKLESS) { disk 1973 drivers/block/drbd/drbd_nl.c rv = _drbd_request_state(device, NS(disk, D_ATTACHING), CS_VERBOSE); disk 2127 drivers/block/drbd/drbd_nl.c ns.disk = D_CONSISTENT; disk 2129 drivers/block/drbd/drbd_nl.c ns.disk = D_OUTDATED; disk 2131 drivers/block/drbd/drbd_nl.c ns.disk = D_INCONSISTENT; disk 2138 drivers/block/drbd/drbd_nl.c if (ns.disk == D_CONSISTENT && disk 2140 drivers/block/drbd/drbd_nl.c ns.disk = D_UP_TO_DATE; disk 2159 drivers/block/drbd/drbd_nl.c ns.disk = D_NEGOTIATING; disk 2194 drivers/block/drbd/drbd_nl.c drbd_force_state(device, NS(disk, D_DISKLESS)); disk 2216 drivers/block/drbd/drbd_nl.c drbd_force_state(device, NS(disk, D_FAILED)); disk 2747 drivers/block/drbd/drbd_nl.c disk, D_OUTDATED), 0); disk 3044 drivers/block/drbd/drbd_nl.c retcode = drbd_request_state(device, NS(disk, D_INCONSISTENT)); disk 3239 drivers/block/drbd/drbd_nl.c if (device->state.disk == D_DISKLESS || device->state.disk == D_FAILED) disk 3251 drivers/block/drbd/drbd_nl.c return drbd_adm_simple_request_state(skb, info, NS(disk, D_OUTDATED)); disk 4240 drivers/block/drbd/drbd_nl.c _drbd_set_state(_NS2(device, disk, D_UP_TO_DATE, pdsk, D_UP_TO_DATE), disk 4342 drivers/block/drbd/drbd_nl.c info->dev_disk_state = device->state.disk; disk 4420 drivers/block/drbd/drbd_nl.c if (device->state.disk == D_DISKLESS && disk 263 drivers/block/drbd/drbd_proc.c state.disk == D_DISKLESS && disk 279 drivers/block/drbd/drbd_proc.c drbd_disk_str(state.disk), disk 2791 drivers/block/drbd/drbd_receiver.c struct gendisk *disk = device->ldev->backing_bdev->bd_contains->bd_disk; disk 2804 drivers/block/drbd/drbd_receiver.c curr_events = (int)part_stat_read_accum(&disk->part0, sectors) - disk 3308 drivers/block/drbd/drbd_receiver.c device->state.disk >= D_NEGOTIATING ? drbd_bm_total_weight(device) : 0, 0); disk 3449 drivers/block/drbd/drbd_receiver.c device->state.disk >= D_NEGOTIATING ? drbd_bm_total_weight(device) : 0, 0); disk 3496 drivers/block/drbd/drbd_receiver.c mydisk = device->state.disk; disk 3498 drivers/block/drbd/drbd_receiver.c mydisk = device->new_state_tmp.disk; disk 3606 drivers/block/drbd/drbd_receiver.c device->state.role == R_PRIMARY && device->state.disk >= D_CONSISTENT) { disk 4149 drivers/block/drbd/drbd_receiver.c device->state.disk >= D_OUTDATED && disk 4263 drivers/block/drbd/drbd_receiver.c device->state.disk >= D_INCONSISTENT) { disk 4302 drivers/block/drbd/drbd_receiver.c device->state.disk < D_INCONSISTENT && disk 4324 drivers/block/drbd/drbd_receiver.c _drbd_set_state(_NS2(device, disk, D_UP_TO_DATE, pdsk, D_UP_TO_DATE), disk 4330 drivers/block/drbd/drbd_receiver.c } else if (device->state.disk < D_INCONSISTENT && disk 4343 drivers/block/drbd/drbd_receiver.c if (device->state.conn >= C_CONNECTED && device->state.disk < D_INCONSISTENT) disk 4376 drivers/block/drbd/drbd_receiver.c ms.pdsk = ps.disk; disk 4377 drivers/block/drbd/drbd_receiver.c ms.disk = ps.pdsk; disk 4457 drivers/block/drbd/drbd_receiver.c real_peer_disk = peer_state.disk; disk 4458 drivers/block/drbd/drbd_receiver.c if (peer_state.disk == D_NEGOTIATING) { disk 4482 drivers/block/drbd/drbd_receiver.c os.conn > C_CONNECTED && os.disk == D_UP_TO_DATE) { disk 4505 drivers/block/drbd/drbd_receiver.c if (os.conn == C_VERIFY_T && os.disk == D_UP_TO_DATE && disk 4546 drivers/block/drbd/drbd_receiver.c if (device->p_uuid && peer_state.disk >= D_NEGOTIATING && disk 4555 drivers/block/drbd/drbd_receiver.c (peer_state.disk == D_NEGOTIATING || disk 4556 drivers/block/drbd/drbd_receiver.c os.disk == D_NEGOTIATING)); disk 4572 drivers/block/drbd/drbd_receiver.c if (device->state.disk == D_NEGOTIATING) { disk 4573 drivers/block/drbd/drbd_receiver.c drbd_force_state(device, NS(disk, D_FAILED)); disk 4574 drivers/block/drbd/drbd_receiver.c } else if (peer_state.disk == D_NEGOTIATING) { disk 4576 drivers/block/drbd/drbd_receiver.c peer_state.disk = D_DISKLESS; disk 4595 drivers/block/drbd/drbd_receiver.c if ((ns.conn == C_CONNECTED || ns.conn == C_WF_BITMAP_S) && ns.disk == D_NEGOTIATING) disk 4596 drivers/block/drbd/drbd_receiver.c ns.disk = device->new_state_tmp.disk; disk 4621 drivers/block/drbd/drbd_receiver.c peer_state.disk != D_NEGOTIATING ) { disk 4652 drivers/block/drbd/drbd_receiver.c device->state.disk < D_NEGOTIATING); disk 904 drivers/block/drbd/drbd_req.c if (device->state.disk == D_UP_TO_DATE) disk 906 drivers/block/drbd/drbd_req.c if (device->state.disk != D_INCONSISTENT) disk 1268 drivers/block/drbd/drbd_req.c return s.disk == D_UP_TO_DATE || s.pdsk == D_UP_TO_DATE; disk 127 drivers/block/drbd/drbd_state.c device_state_change->disk_state[OLD] = device->state.disk; disk 178 drivers/block/drbd/drbd_state.c device_state_change->disk_state[NEW] = device->state.disk; disk 303 drivers/block/drbd/drbd_state.c if (device->state.disk != D_DISKLESS || disk 376 drivers/block/drbd/drbd_state.c disk_state = max_t(enum drbd_disk_state, disk_state, device->state.disk); disk 392 drivers/block/drbd/drbd_state.c disk_state = min_t(enum drbd_disk_state, disk_state, device->state.disk); disk 474 drivers/block/drbd/drbd_state.c (os.disk != D_FAILED && ns.disk == D_FAILED))) || disk 675 drivers/block/drbd/drbd_state.c return drbd_req_state(device, NS(disk, D_FAILED), disk 689 drivers/block/drbd/drbd_state.c device->state.disk != D_FAILED); disk 722 drivers/block/drbd/drbd_state.c drbd_disk_str(ns.disk), disk 762 drivers/block/drbd/drbd_state.c if (ns.disk != os.disk && flags & CS_DC_DISK) disk 764 drivers/block/drbd/drbd_state.c drbd_disk_str(os.disk), disk 765 drivers/block/drbd/drbd_state.c drbd_disk_str(ns.disk)); disk 853 drivers/block/drbd/drbd_state.c else if (ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.disk < D_UP_TO_DATE) disk 860 drivers/block/drbd/drbd_state.c else if (ns.role == R_PRIMARY && ns.disk <= D_INCONSISTENT && ns.pdsk <= D_INCONSISTENT) disk 863 drivers/block/drbd/drbd_state.c else if (ns.conn > C_CONNECTED && ns.disk < D_INCONSISTENT) disk 869 drivers/block/drbd/drbd_state.c else if (ns.conn > C_CONNECTED && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE) disk 876 drivers/block/drbd/drbd_state.c ns.disk == D_OUTDATED) disk 887 drivers/block/drbd/drbd_state.c else if (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE) disk 923 drivers/block/drbd/drbd_state.c if (ns.disk > D_ATTACHING && os.disk == D_DISKLESS) disk 929 drivers/block/drbd/drbd_state.c if (ns.disk == D_OUTDATED && os.disk < D_OUTDATED && os.disk != D_ATTACHING) disk 947 drivers/block/drbd/drbd_state.c && ns.disk != D_UP_TO_DATE && ns.disk != D_DISKLESS disk 1021 drivers/block/drbd/drbd_state.c if (ns.disk == D_FAILED && os.disk == D_DISKLESS) disk 1078 drivers/block/drbd/drbd_state.c if (ns.conn == C_STANDALONE && ns.disk == D_DISKLESS && ns.role == R_SECONDARY) disk 1083 drivers/block/drbd/drbd_state.c if (ns.conn > C_CONNECTED && (ns.disk <= D_FAILED || ns.pdsk <= D_FAILED)) { disk 1091 drivers/block/drbd/drbd_state.c if (ns.conn < C_CONNECTED && ns.disk == D_NEGOTIATING && disk 1094 drivers/block/drbd/drbd_state.c ns.disk = device->new_state_tmp.disk; disk 1099 drivers/block/drbd/drbd_state.c ns.disk = D_DISKLESS; disk 1107 drivers/block/drbd/drbd_state.c if (ns.disk == D_CONSISTENT || ns.disk == D_OUTDATED) disk 1108 drivers/block/drbd/drbd_state.c ns.disk = D_UP_TO_DATE; disk 1176 drivers/block/drbd/drbd_state.c if (ns.disk > disk_max) disk 1177 drivers/block/drbd/drbd_state.c ns.disk = disk_max; disk 1179 drivers/block/drbd/drbd_state.c if (ns.disk < disk_min) { disk 1182 drivers/block/drbd/drbd_state.c ns.disk = disk_min; disk 1199 drivers/block/drbd/drbd_state.c (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE) && disk 1200 drivers/block/drbd/drbd_state.c !(os.role == R_PRIMARY && os.disk < D_UP_TO_DATE && os.pdsk < D_UP_TO_DATE)) disk 1318 drivers/block/drbd/drbd_state.c if ((os.disk != D_FAILED && ns.disk == D_FAILED) || disk 1319 drivers/block/drbd/drbd_state.c (os.disk != D_DISKLESS && ns.disk == D_DISKLESS)) disk 1345 drivers/block/drbd/drbd_state.c if (os.disk == D_ATTACHING && ns.disk >= D_NEGOTIATING) disk 1423 drivers/block/drbd/drbd_state.c if (device->state.disk > D_INCONSISTENT) disk 1425 drivers/block/drbd/drbd_state.c if (device->state.disk > D_OUTDATED) disk 1433 drivers/block/drbd/drbd_state.c if (os.disk < D_CONSISTENT && ns.disk >= D_CONSISTENT) disk 1439 drivers/block/drbd/drbd_state.c if (os.disk == D_INCONSISTENT && os.pdsk == D_INCONSISTENT && disk 1465 drivers/block/drbd/drbd_state.c if ((os.disk == D_ATTACHING || os.disk == D_NEGOTIATING) && disk 1466 drivers/block/drbd/drbd_state.c ns.disk > D_NEGOTIATING) disk 1715 drivers/block/drbd/drbd_state.c if ((os.disk != D_UP_TO_DATE || os.pdsk != D_UP_TO_DATE) disk 1716 drivers/block/drbd/drbd_state.c && (ns.disk == D_UP_TO_DATE && ns.pdsk == D_UP_TO_DATE)) { disk 1725 drivers/block/drbd/drbd_state.c if (!(os.role == R_PRIMARY && os.disk < D_UP_TO_DATE && os.pdsk < D_UP_TO_DATE) && disk 1726 drivers/block/drbd/drbd_state.c (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE)) disk 1739 drivers/block/drbd/drbd_state.c if ((os.disk == D_ATTACHING || os.disk == D_NEGOTIATING) && disk 1817 drivers/block/drbd/drbd_state.c device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) { disk 1831 drivers/block/drbd/drbd_state.c device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) { disk 1859 drivers/block/drbd/drbd_state.c os.disk == D_ATTACHING && ns.disk == D_NEGOTIATING) { disk 1894 drivers/block/drbd/drbd_state.c if (os.disk != D_FAILED && ns.disk == D_FAILED) { disk 1934 drivers/block/drbd/drbd_state.c if (device->state.disk != D_FAILED) disk 1937 drivers/block/drbd/drbd_state.c drbd_disk_str(device->state.disk)); disk 1955 drivers/block/drbd/drbd_state.c if (os.disk != D_DISKLESS && ns.disk == D_DISKLESS) { disk 1958 drivers/block/drbd/drbd_state.c if (device->state.disk != D_DISKLESS) disk 1961 drivers/block/drbd/drbd_state.c drbd_disk_str(device->state.disk)); disk 1971 drivers/block/drbd/drbd_state.c if (os.disk == D_UP_TO_DATE && ns.disk == D_INCONSISTENT && ns.conn >= C_CONNECTED) disk 1975 drivers/block/drbd/drbd_state.c if (ns.disk > D_NEGOTIATING && ns.pdsk > D_NEGOTIATING && disk 1989 drivers/block/drbd/drbd_state.c if (os.disk < D_UP_TO_DATE && os.conn >= C_SYNC_SOURCE && ns.conn == C_CONNECTED) disk 2017 drivers/block/drbd/drbd_state.c if (ns.disk == D_DISKLESS && disk 2113 drivers/block/drbd/drbd_state.c .disk = D_DISKLESS, disk 2137 drivers/block/drbd/drbd_state.c if (cs.disk != os.disk) disk 2165 drivers/block/drbd/drbd_state.c if (flags & CS_IGN_OUTD_FAIL && ns.disk == D_OUTDATED && os.disk < D_OUTDATED) disk 2166 drivers/block/drbd/drbd_state.c ns.disk = os.disk; disk 2202 drivers/block/drbd/drbd_state.c .disk = D_MASK, disk 2227 drivers/block/drbd/drbd_state.c if (flags & CS_IGN_OUTD_FAIL && ns.disk == D_OUTDATED && os.disk < D_OUTDATED) disk 2228 drivers/block/drbd/drbd_state.c ns.disk = os.disk; disk 2236 drivers/block/drbd/drbd_state.c ns_max.disk = max_t(enum drbd_disk_state, ns.disk, ns_max.disk); disk 2242 drivers/block/drbd/drbd_state.c ns_min.disk = min_t(enum drbd_disk_state, ns.disk, ns_min.disk); disk 2252 drivers/block/drbd/drbd_state.c .disk = D_DISKLESS, disk 90 drivers/block/drbd/drbd_state.h unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */ disk 104 drivers/block/drbd/drbd_state.h unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */ disk 950 drivers/block/drbd/drbd_worker.c ns.disk = D_INCONSISTENT; disk 953 drivers/block/drbd/drbd_worker.c ns.disk = D_UP_TO_DATE; disk 957 drivers/block/drbd/drbd_worker.c ns.disk = D_UP_TO_DATE; disk 1005 drivers/block/drbd/drbd_worker.c disk_state = min_t(enum drbd_disk_state, disk_state, device->state.disk); disk 1538 drivers/block/drbd/drbd_worker.c if (!odev->ldev || odev->state.disk == D_DISKLESS) disk 1570 drivers/block/drbd/drbd_worker.c if (odev->state.conn == C_STANDALONE && odev->state.disk == D_DISKLESS) disk 1596 drivers/block/drbd/drbd_worker.c if (odev->state.conn == C_STANDALONE && odev->state.disk == D_DISKLESS) disk 1646 drivers/block/drbd/drbd_worker.c if (!odev || !odev->ldev || odev->state.disk == D_DISKLESS) disk 1674 drivers/block/drbd/drbd_worker.c struct gendisk *disk = device->ldev->backing_bdev->bd_contains->bd_disk; disk 1680 drivers/block/drbd/drbd_worker.c device->rs_last_events = (int)part_stat_read_accum(&disk->part0, sectors); disk 1809 drivers/block/drbd/drbd_worker.c ns.disk = D_INCONSISTENT; disk 1948 drivers/block/drbd/drbd_worker.c D_ASSERT(device, device->state.disk == D_FAILED); disk 1981 drivers/block/drbd/drbd_worker.c drbd_force_state(device, NS(disk, D_DISKLESS)); disk 2223 drivers/block/drbd/drbd_worker.c D_ASSERT(device, device->state.disk == D_DISKLESS && device->state.conn == C_STANDALONE); disk 3979 drivers/block/floppy.c static void floppy_release(struct gendisk *disk, fmode_t mode) disk 3981 drivers/block/floppy.c int drive = (long)disk->private_data; disk 4098 drivers/block/floppy.c static unsigned int floppy_check_events(struct gendisk *disk, disk 4101 drivers/block/floppy.c int drive = (long)disk->private_data; disk 4192 drivers/block/floppy.c static int floppy_revalidate(struct gendisk *disk) disk 4194 drivers/block/floppy.c int drive = (long)disk->private_data; disk 4232 drivers/block/floppy.c set_capacity(disk, floppy_sizes[UDRS->fd_device]); disk 757 drivers/block/loop.c struct gendisk *disk = dev_to_disk(dev); disk 758 drivers/block/loop.c struct loop_device *lo = disk->private_data; disk 1829 drivers/block/loop.c static void lo_release(struct gendisk *disk, fmode_t mode) disk 1834 drivers/block/loop.c lo = disk->private_data; disk 2004 drivers/block/loop.c struct gendisk *disk; disk 2057 drivers/block/loop.c disk = lo->lo_disk = alloc_disk(1 << part_shift); disk 2058 drivers/block/loop.c if (!disk) disk 2080 drivers/block/loop.c disk->flags |= GENHD_FL_NO_PART_SCAN; disk 2081 drivers/block/loop.c disk->flags |= GENHD_FL_EXT_DEVT; disk 2085 drivers/block/loop.c disk->major = LOOP_MAJOR; disk 2086 drivers/block/loop.c disk->first_minor = i << part_shift; disk 2087 drivers/block/loop.c disk->fops = &lo_fops; disk 2088 drivers/block/loop.c disk->private_data = lo; disk 2089 drivers/block/loop.c disk->queue = lo->lo_queue; disk 2090 drivers/block/loop.c sprintf(disk->disk_name, "loop%d", i); disk 2091 drivers/block/loop.c add_disk(disk); disk 2432 drivers/block/mtip32xx/mtip32xx.c dd->dfs_node = debugfs_create_dir(dd->disk->disk_name, dfs_parent); disk 2436 drivers/block/mtip32xx/mtip32xx.c dd->disk->disk_name); disk 3361 drivers/block/mtip32xx/mtip32xx.c static void mtip_block_release(struct gendisk *disk, fmode_t mode) disk 3583 drivers/block/mtip32xx/mtip32xx.c if (dd->disk) disk 3591 drivers/block/mtip32xx/mtip32xx.c dd->disk = alloc_disk_node(MTIP_MAX_MINORS, dd->numa_node); disk 3592 drivers/block/mtip32xx/mtip32xx.c if (dd->disk == NULL) { disk 3606 drivers/block/mtip32xx/mtip32xx.c dd->disk->disk_name, disk 3611 drivers/block/mtip32xx/mtip32xx.c dd->disk->major = dd->major; disk 3612 drivers/block/mtip32xx/mtip32xx.c dd->disk->first_minor = index * MTIP_MAX_MINORS; disk 3613 drivers/block/mtip32xx/mtip32xx.c dd->disk->minors = MTIP_MAX_MINORS; disk 3614 drivers/block/mtip32xx/mtip32xx.c dd->disk->fops = &mtip_block_ops; disk 3615 drivers/block/mtip32xx/mtip32xx.c dd->disk->private_data = dd; disk 3647 drivers/block/mtip32xx/mtip32xx.c dd->disk->queue = dd->queue; disk 3684 drivers/block/mtip32xx/mtip32xx.c set_capacity(dd->disk, capacity); disk 3687 drivers/block/mtip32xx/mtip32xx.c device_add_disk(&dd->pdev->dev, dd->disk, NULL); disk 3689 drivers/block/mtip32xx/mtip32xx.c dd->bdev = bdget_disk(dd->disk, 0); disk 3694 drivers/block/mtip32xx/mtip32xx.c kobj = kobject_get(&disk_to_dev(dd->disk)->kobj); disk 3727 drivers/block/mtip32xx/mtip32xx.c del_gendisk(dd->disk); disk 3740 drivers/block/mtip32xx/mtip32xx.c put_disk(dd->disk); disk 3782 drivers/block/mtip32xx/mtip32xx.c kobj = kobject_get(&disk_to_dev(dd->disk)->kobj); disk 3799 drivers/block/mtip32xx/mtip32xx.c dd->disk->disk_name); disk 3814 drivers/block/mtip32xx/mtip32xx.c if (dd->disk) { disk 3816 drivers/block/mtip32xx/mtip32xx.c del_gendisk(dd->disk); disk 3817 drivers/block/mtip32xx/mtip32xx.c if (dd->disk->queue) { disk 3822 drivers/block/mtip32xx/mtip32xx.c put_disk(dd->disk); disk 3824 drivers/block/mtip32xx/mtip32xx.c dd->disk = NULL; disk 3851 drivers/block/mtip32xx/mtip32xx.c if (dd->disk) { disk 3853 drivers/block/mtip32xx/mtip32xx.c "Shutting down %s ...\n", dd->disk->disk_name); disk 3856 drivers/block/mtip32xx/mtip32xx.c del_gendisk(dd->disk); disk 3857 drivers/block/mtip32xx/mtip32xx.c if (dd->disk->queue) { disk 3861 drivers/block/mtip32xx/mtip32xx.c put_disk(dd->disk); disk 3862 drivers/block/mtip32xx/mtip32xx.c dd->disk = NULL; disk 3873 drivers/block/mtip32xx/mtip32xx.c "Suspending %s ...\n", dd->disk->disk_name); disk 3881 drivers/block/mtip32xx/mtip32xx.c dd->disk->disk_name); disk 430 drivers/block/mtip32xx/mtip32xx.h struct gendisk *disk; /* Pointer to our gendisk structure. */ disk 114 drivers/block/nbd.c struct gendisk *disk; disk 142 drivers/block/nbd.c #define nbd_name(nbd) ((nbd)->disk->disk_name) disk 162 drivers/block/nbd.c return disk_to_dev(nbd->disk); disk 209 drivers/block/nbd.c struct gendisk *disk = dev_to_disk(dev); disk 210 drivers/block/nbd.c struct nbd_device *nbd = (struct nbd_device *)disk->private_data; disk 222 drivers/block/nbd.c struct gendisk *disk = nbd->disk; disk 225 drivers/block/nbd.c if (disk) { disk 226 drivers/block/nbd.c q = disk->queue; disk 227 drivers/block/nbd.c del_gendisk(disk); disk 230 drivers/block/nbd.c disk->private_data = NULL; disk 231 drivers/block/nbd.c put_disk(disk); disk 294 drivers/block/nbd.c set_capacity(nbd->disk, 0); disk 302 drivers/block/nbd.c struct block_device *bdev = bdget_disk(nbd->disk, 0); disk 305 drivers/block/nbd.c nbd->disk->queue->limits.discard_granularity = config->blksize; disk 306 drivers/block/nbd.c nbd->disk->queue->limits.discard_alignment = config->blksize; disk 307 drivers/block/nbd.c blk_queue_max_discard_sectors(nbd->disk->queue, UINT_MAX); disk 309 drivers/block/nbd.c blk_queue_logical_block_size(nbd->disk->queue, config->blksize); disk 310 drivers/block/nbd.c blk_queue_physical_block_size(nbd->disk->queue, config->blksize); disk 311 drivers/block/nbd.c set_capacity(nbd->disk, config->bytesize >> 9); disk 362 drivers/block/nbd.c dev_warn(disk_to_dev(nbd->disk), "shutting down sockets\n"); disk 469 drivers/block/nbd.c dev_err_ratelimited(disk_to_dev(nbd->disk), disk 539 drivers/block/nbd.c dev_err_ratelimited(disk_to_dev(nbd->disk), disk 597 drivers/block/nbd.c dev_err_ratelimited(disk_to_dev(nbd->disk), disk 638 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), disk 681 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), disk 687 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "Wrong magic (0x%lx)\n", disk 699 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "Unexpected reply (%d) %p\n", disk 708 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "Double reply on req %p, cmd_cookie %u, handle cookie %u\n", disk 714 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "Command already handled %p\n", disk 720 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "Raced with timeout on req %p\n", disk 726 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "Other side returned error (%d)\n", disk 741 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "Receive data failed (result %d)\n", disk 810 drivers/block/nbd.c blk_mq_quiesce_queue(nbd->disk->queue); disk 812 drivers/block/nbd.c blk_mq_unquiesce_queue(nbd->disk->queue); disk 813 drivers/block/nbd.c dev_dbg(disk_to_dev(nbd->disk), "queue cleared\n"); disk 827 drivers/block/nbd.c dev_err_ratelimited(disk_to_dev(nbd->disk), disk 850 drivers/block/nbd.c dev_err_ratelimited(disk_to_dev(nbd->disk), disk 880 drivers/block/nbd.c dev_err_ratelimited(disk_to_dev(nbd->disk), disk 888 drivers/block/nbd.c dev_err_ratelimited(disk_to_dev(nbd->disk), disk 938 drivers/block/nbd.c dev_err_ratelimited(disk_to_dev(nbd->disk), disk 994 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "Unsupported socket: shutdown callout must be supported.\n"); disk 1023 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), disk 1129 drivers/block/nbd.c set_disk_ro(nbd->disk, true); disk 1131 drivers/block/nbd.c set_disk_ro(nbd->disk, false); disk 1133 drivers/block/nbd.c blk_queue_flag_set(QUEUE_FLAG_DISCARD, nbd->disk->queue); disk 1136 drivers/block/nbd.c blk_queue_write_cache(nbd->disk->queue, true, true); disk 1138 drivers/block/nbd.c blk_queue_write_cache(nbd->disk->queue, true, false); disk 1141 drivers/block/nbd.c blk_queue_write_cache(nbd->disk->queue, false, false); disk 1162 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), disk 1172 drivers/block/nbd.c dev_info(disk_to_dev(nbd->disk), "NBD_DISCONNECT\n"); disk 1195 drivers/block/nbd.c device_remove_file(disk_to_dev(nbd->disk), &pid_attr); disk 1214 drivers/block/nbd.c nbd->disk->queue->limits.discard_granularity = 0; disk 1215 drivers/block/nbd.c nbd->disk->queue->limits.discard_alignment = 0; disk 1216 drivers/block/nbd.c blk_queue_max_discard_sectors(nbd->disk->queue, UINT_MAX); disk 1217 drivers/block/nbd.c blk_queue_flag_clear(QUEUE_FLAG_DISCARD, nbd->disk->queue); disk 1237 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "server does not support multiple connections per device.\n"); disk 1245 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "Could not allocate knbd recv work queue.\n"); disk 1254 drivers/block/nbd.c error = device_create_file(disk_to_dev(nbd->disk), &pid_attr); disk 1256 drivers/block/nbd.c dev_err(disk_to_dev(nbd->disk), "device_create_file failed!\n"); disk 1346 drivers/block/nbd.c blk_queue_rq_timeout(nbd->disk->queue, timeout * HZ); disk 1490 drivers/block/nbd.c static void nbd_release(struct gendisk *disk, fmode_t mode) disk 1492 drivers/block/nbd.c struct nbd_device *nbd = disk->private_data; disk 1493 drivers/block/nbd.c struct block_device *bdev = bdget_disk(disk, 0); disk 1661 drivers/block/nbd.c struct gendisk *disk; disk 1669 drivers/block/nbd.c disk = alloc_disk(1 << part_shift); disk 1670 drivers/block/nbd.c if (!disk) disk 1687 drivers/block/nbd.c nbd->disk = disk; disk 1707 drivers/block/nbd.c disk->queue = q; disk 1712 drivers/block/nbd.c blk_queue_flag_set(QUEUE_FLAG_NONROT, disk->queue); disk 1713 drivers/block/nbd.c blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, disk->queue); disk 1714 drivers/block/nbd.c disk->queue->limits.discard_granularity = 0; disk 1715 drivers/block/nbd.c disk->queue->limits.discard_alignment = 0; disk 1716 drivers/block/nbd.c blk_queue_max_discard_sectors(disk->queue, 0); disk 1717 drivers/block/nbd.c blk_queue_max_segment_size(disk->queue, UINT_MAX); disk 1718 drivers/block/nbd.c blk_queue_max_segments(disk->queue, USHRT_MAX); disk 1719 drivers/block/nbd.c blk_queue_max_hw_sectors(disk->queue, 65536); disk 1720 drivers/block/nbd.c disk->queue->limits.max_sectors = 256; disk 1726 drivers/block/nbd.c disk->major = NBD_MAJOR; disk 1727 drivers/block/nbd.c disk->first_minor = index << part_shift; disk 1728 drivers/block/nbd.c disk->fops = &nbd_fops; disk 1729 drivers/block/nbd.c disk->private_data = nbd; disk 1730 drivers/block/nbd.c sprintf(disk->disk_name, "nbd%d", index); disk 1731 drivers/block/nbd.c add_disk(disk); disk 1740 drivers/block/nbd.c put_disk(disk); disk 77 drivers/block/null_blk.h struct gendisk *disk; disk 94 drivers/block/null_blk.h int null_zone_report(struct gendisk *disk, sector_t sector, disk 106 drivers/block/null_blk.h static inline int null_zone_report(struct gendisk *disk, sector_t sector, disk 1398 drivers/block/null_blk_main.c del_gendisk(nullb->disk); disk 1410 drivers/block/null_blk_main.c put_disk(nullb->disk); disk 1433 drivers/block/null_blk_main.c static void null_release(struct gendisk *disk, fmode_t mode) disk 1530 drivers/block/null_blk_main.c struct gendisk *disk; disk 1533 drivers/block/null_blk_main.c disk = nullb->disk = alloc_disk_node(1, nullb->dev->home_node); disk 1534 drivers/block/null_blk_main.c if (!disk) disk 1537 drivers/block/null_blk_main.c set_capacity(disk, size >> 9); disk 1539 drivers/block/null_blk_main.c disk->flags |= GENHD_FL_EXT_DEVT | GENHD_FL_SUPPRESS_PARTITION_INFO; disk 1540 drivers/block/null_blk_main.c disk->major = null_major; disk 1541 drivers/block/null_blk_main.c disk->first_minor = nullb->index; disk 1542 drivers/block/null_blk_main.c disk->fops = &null_fops; disk 1543 drivers/block/null_blk_main.c disk->private_data = nullb; disk 1544 drivers/block/null_blk_main.c disk->queue = nullb->q; disk 1545 drivers/block/null_blk_main.c strncpy(disk->disk_name, nullb->disk_name, DISK_NAME_LEN); disk 1548 drivers/block/null_blk_main.c int ret = blk_revalidate_disk_zones(disk); disk 1554 drivers/block/null_blk_main.c add_disk(disk); disk 73 drivers/block/null_blk_zoned.c int null_zone_report(struct gendisk *disk, sector_t sector, disk 76 drivers/block/null_blk_zoned.c struct nullb *nullb = disk->private_data; disk 202 drivers/block/paride/pcd.c struct gendisk *disk; disk 245 drivers/block/paride/pcd.c static void pcd_block_release(struct gendisk *disk, fmode_t mode) disk 247 drivers/block/paride/pcd.c struct pcd_unit *cd = disk->private_data; disk 266 drivers/block/paride/pcd.c static unsigned int pcd_block_check_events(struct gendisk *disk, disk 269 drivers/block/paride/pcd.c struct pcd_unit *cd = disk->private_data; disk 309 drivers/block/paride/pcd.c struct gendisk *disk = alloc_disk(1); disk 311 drivers/block/paride/pcd.c if (!disk) disk 314 drivers/block/paride/pcd.c disk->queue = blk_mq_init_sq_queue(&cd->tag_set, &pcd_mq_ops, disk 316 drivers/block/paride/pcd.c if (IS_ERR(disk->queue)) { disk 317 drivers/block/paride/pcd.c disk->queue = NULL; disk 318 drivers/block/paride/pcd.c put_disk(disk); disk 323 drivers/block/paride/pcd.c disk->queue->queuedata = cd; disk 324 drivers/block/paride/pcd.c blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH); disk 325 drivers/block/paride/pcd.c cd->disk = disk; disk 341 drivers/block/paride/pcd.c disk->major = major; disk 342 drivers/block/paride/pcd.c disk->first_minor = unit; disk 343 drivers/block/paride/pcd.c strcpy(disk->disk_name, cd->name); /* umm... */ disk 344 drivers/block/paride/pcd.c disk->fops = &pcd_bdops; disk 345 drivers/block/paride/pcd.c disk->flags = GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE; disk 346 drivers/block/paride/pcd.c disk->events = DISK_EVENT_MEDIA_CHANGE; disk 726 drivers/block/paride/pcd.c if (cd->disk && pi_init(cd->pi, 1, -1, -1, -1, -1, -1, disk 739 drivers/block/paride/pcd.c if (!cd->disk) disk 757 drivers/block/paride/pcd.c if (!cd->disk) disk 759 drivers/block/paride/pcd.c blk_cleanup_queue(cd->disk->queue); disk 760 drivers/block/paride/pcd.c cd->disk->queue = NULL; disk 762 drivers/block/paride/pcd.c put_disk(cd->disk); disk 1020 drivers/block/paride/pcd.c if (!cd->disk) disk 1023 drivers/block/paride/pcd.c blk_cleanup_queue(cd->disk->queue); disk 1025 drivers/block/paride/pcd.c put_disk(cd->disk); disk 1033 drivers/block/paride/pcd.c cd->disk->private_data = cd; disk 1034 drivers/block/paride/pcd.c add_disk(cd->disk); disk 1047 drivers/block/paride/pcd.c if (!cd->disk) disk 1051 drivers/block/paride/pcd.c del_gendisk(cd->disk); disk 1055 drivers/block/paride/pcd.c blk_cleanup_queue(cd->disk->queue); disk 1057 drivers/block/paride/pcd.c put_disk(cd->disk); disk 247 drivers/block/paride/pd.c enum action (*func)(struct pd_unit *disk); disk 259 drivers/block/paride/pd.c static inline int status_reg(struct pd_unit *disk) disk 261 drivers/block/paride/pd.c return pi_read_regr(disk->pi, 1, 6); disk 264 drivers/block/paride/pd.c static inline int read_reg(struct pd_unit *disk, int reg) disk 266 drivers/block/paride/pd.c return pi_read_regr(disk->pi, 0, reg); disk 269 drivers/block/paride/pd.c static inline void write_status(struct pd_unit *disk, int val) disk 271 drivers/block/paride/pd.c pi_write_regr(disk->pi, 1, 6, val); disk 274 drivers/block/paride/pd.c static inline void write_reg(struct pd_unit *disk, int reg, int val) disk 276 drivers/block/paride/pd.c pi_write_regr(disk->pi, 0, reg, val); disk 279 drivers/block/paride/pd.c static inline u8 DRIVE(struct pd_unit *disk) disk 281 drivers/block/paride/pd.c return 0xa0+0x10*disk->drive; disk 286 drivers/block/paride/pd.c static void pd_print_error(struct pd_unit *disk, char *msg, int status) disk 290 drivers/block/paride/pd.c printk("%s: %s: status = 0x%x =", disk->name, msg, status); disk 297 drivers/block/paride/pd.c static void pd_reset(struct pd_unit *disk) disk 299 drivers/block/paride/pd.c write_status(disk, 4); disk 301 drivers/block/paride/pd.c write_status(disk, 0); disk 307 drivers/block/paride/pd.c static int pd_wait_for(struct pd_unit *disk, int w, char *msg) disk 313 drivers/block/paride/pd.c r = status_reg(disk); disk 319 drivers/block/paride/pd.c e = (read_reg(disk, 1) << 8) + read_reg(disk, 7); disk 323 drivers/block/paride/pd.c pd_print_error(disk, msg, e); disk 327 drivers/block/paride/pd.c static void pd_send_command(struct pd_unit *disk, int n, int s, int h, int c0, int c1, int func) disk 329 drivers/block/paride/pd.c write_reg(disk, 6, DRIVE(disk) + h); disk 330 drivers/block/paride/pd.c write_reg(disk, 1, 0); /* the IDE task file */ disk 331 drivers/block/paride/pd.c write_reg(disk, 2, n); disk 332 drivers/block/paride/pd.c write_reg(disk, 3, s); disk 333 drivers/block/paride/pd.c write_reg(disk, 4, c0); disk 334 drivers/block/paride/pd.c write_reg(disk, 5, c1); disk 335 drivers/block/paride/pd.c write_reg(disk, 7, func); disk 340 drivers/block/paride/pd.c static void pd_ide_command(struct pd_unit *disk, int func, int block, int count) disk 344 drivers/block/paride/pd.c if (disk->can_lba) { disk 350 drivers/block/paride/pd.c s = (block % disk->sectors) + 1; disk 351 drivers/block/paride/pd.c h = (block /= disk->sectors) % disk->heads; disk 352 drivers/block/paride/pd.c c0 = (block /= disk->heads) % 256; disk 355 drivers/block/paride/pd.c pd_send_command(disk, count, s, h, c0, c1, func); disk 399 drivers/block/paride/pd.c struct gendisk *disk; disk 404 drivers/block/paride/pd.c disk = pd[pd_queue].gd; disk 405 drivers/block/paride/pd.c q = disk ? disk->queue : NULL; disk 409 drivers/block/paride/pd.c struct pd_unit *disk = q->queuedata; disk 411 drivers/block/paride/pd.c if (list_empty(&disk->rq_list)) disk 414 drivers/block/paride/pd.c pd_req = list_first_entry(&disk->rq_list, disk 635 drivers/block/paride/pd.c static void pd_init_dev_parms(struct pd_unit *disk) disk 637 drivers/block/paride/pd.c pd_wait_for(disk, 0, DBMSG("before init_dev_parms")); disk 638 drivers/block/paride/pd.c pd_send_command(disk, disk->sectors, 0, disk->heads - 1, 0, 0, disk 641 drivers/block/paride/pd.c pd_wait_for(disk, 0, "Initialise device parameters"); disk 644 drivers/block/paride/pd.c static enum action pd_door_lock(struct pd_unit *disk) disk 646 drivers/block/paride/pd.c if (!(pd_wait_for(disk, STAT_READY, "Lock") & STAT_ERR)) { disk 647 drivers/block/paride/pd.c pd_send_command(disk, 1, 0, 0, 0, 0, IDE_DOORLOCK); disk 648 drivers/block/paride/pd.c pd_wait_for(disk, STAT_READY, "Lock done"); disk 653 drivers/block/paride/pd.c static enum action pd_door_unlock(struct pd_unit *disk) disk 655 drivers/block/paride/pd.c if (!(pd_wait_for(disk, STAT_READY, "Lock") & STAT_ERR)) { disk 656 drivers/block/paride/pd.c pd_send_command(disk, 1, 0, 0, 0, 0, IDE_DOORUNLOCK); disk 657 drivers/block/paride/pd.c pd_wait_for(disk, STAT_READY, "Lock done"); disk 662 drivers/block/paride/pd.c static enum action pd_eject(struct pd_unit *disk) disk 664 drivers/block/paride/pd.c pd_wait_for(disk, 0, DBMSG("before unlock on eject")); disk 665 drivers/block/paride/pd.c pd_send_command(disk, 1, 0, 0, 0, 0, IDE_DOORUNLOCK); disk 666 drivers/block/paride/pd.c pd_wait_for(disk, 0, DBMSG("after unlock on eject")); disk 667 drivers/block/paride/pd.c pd_wait_for(disk, 0, DBMSG("before eject")); disk 668 drivers/block/paride/pd.c pd_send_command(disk, 0, 0, 0, 0, 0, IDE_EJECT); disk 669 drivers/block/paride/pd.c pd_wait_for(disk, 0, DBMSG("after eject")); disk 673 drivers/block/paride/pd.c static enum action pd_media_check(struct pd_unit *disk) disk 675 drivers/block/paride/pd.c int r = pd_wait_for(disk, STAT_READY, DBMSG("before media_check")); disk 677 drivers/block/paride/pd.c pd_send_command(disk, 1, 1, 0, 0, 0, IDE_READ_VRFY); disk 678 drivers/block/paride/pd.c r = pd_wait_for(disk, STAT_READY, DBMSG("RDY after READ_VRFY")); disk 680 drivers/block/paride/pd.c disk->changed = 1; /* say changed if other error */ disk 682 drivers/block/paride/pd.c disk->changed = 1; disk 683 drivers/block/paride/pd.c pd_send_command(disk, 1, 0, 0, 0, 0, IDE_ACKCHANGE); disk 684 drivers/block/paride/pd.c pd_wait_for(disk, STAT_READY, DBMSG("RDY after ACKCHANGE")); disk 685 drivers/block/paride/pd.c pd_send_command(disk, 1, 1, 0, 0, 0, IDE_READ_VRFY); disk 686 drivers/block/paride/pd.c r = pd_wait_for(disk, STAT_READY, DBMSG("RDY after VRFY")); disk 691 drivers/block/paride/pd.c static void pd_standby_off(struct pd_unit *disk) disk 693 drivers/block/paride/pd.c pd_wait_for(disk, 0, DBMSG("before STANDBY")); disk 694 drivers/block/paride/pd.c pd_send_command(disk, 0, 0, 0, 0, 0, IDE_STANDBY); disk 695 drivers/block/paride/pd.c pd_wait_for(disk, 0, DBMSG("after STANDBY")); disk 698 drivers/block/paride/pd.c static enum action pd_identify(struct pd_unit *disk) disk 709 drivers/block/paride/pd.c if (disk->drive == 0) disk 710 drivers/block/paride/pd.c pd_reset(disk); disk 712 drivers/block/paride/pd.c write_reg(disk, 6, DRIVE(disk)); disk 713 drivers/block/paride/pd.c pd_wait_for(disk, 0, DBMSG("before IDENT")); disk 714 drivers/block/paride/pd.c pd_send_command(disk, 1, 0, 0, 0, 0, IDE_IDENTIFY); disk 716 drivers/block/paride/pd.c if (pd_wait_for(disk, STAT_DRQ, DBMSG("IDENT DRQ")) & STAT_ERR) disk 718 drivers/block/paride/pd.c pi_read_block(disk->pi, pd_scratch, 512); disk 719 drivers/block/paride/pd.c disk->can_lba = pd_scratch[99] & 2; disk 720 drivers/block/paride/pd.c disk->sectors = le16_to_cpu(*(__le16 *) (pd_scratch + 12)); disk 721 drivers/block/paride/pd.c disk->heads = le16_to_cpu(*(__le16 *) (pd_scratch + 6)); disk 722 drivers/block/paride/pd.c disk->cylinders = le16_to_cpu(*(__le16 *) (pd_scratch + 2)); disk 723 drivers/block/paride/pd.c if (disk->can_lba) disk 724 drivers/block/paride/pd.c disk->capacity = le32_to_cpu(*(__le32 *) (pd_scratch + 120)); disk 726 drivers/block/paride/pd.c disk->capacity = disk->sectors * disk->heads * disk->cylinders; disk 736 drivers/block/paride/pd.c disk->removable = pd_scratch[0] & 0x80; disk 739 drivers/block/paride/pd.c disk->name, id, disk 740 drivers/block/paride/pd.c disk->drive ? "slave" : "master", disk 741 drivers/block/paride/pd.c disk->capacity, disk->capacity / 2048, disk 742 drivers/block/paride/pd.c disk->cylinders, disk->heads, disk->sectors, disk 743 drivers/block/paride/pd.c disk->removable ? "removable" : "fixed"); disk 745 drivers/block/paride/pd.c if (disk->capacity) disk 746 drivers/block/paride/pd.c pd_init_dev_parms(disk); disk 747 drivers/block/paride/pd.c if (!disk->standby) disk 748 drivers/block/paride/pd.c pd_standby_off(disk); disk 758 drivers/block/paride/pd.c struct pd_unit *disk = hctx->queue->queuedata; disk 765 drivers/block/paride/pd.c list_add_tail(&bd->rq->queuelist, &disk->rq_list); disk 772 drivers/block/paride/pd.c static int pd_special_command(struct pd_unit *disk, disk 773 drivers/block/paride/pd.c enum action (*func)(struct pd_unit *disk)) disk 778 drivers/block/paride/pd.c rq = blk_get_request(disk->gd->queue, REQ_OP_DRV_IN, 0); disk 784 drivers/block/paride/pd.c blk_execute_rq(disk->gd->queue, disk->gd, rq, 0); disk 793 drivers/block/paride/pd.c struct pd_unit *disk = bdev->bd_disk->private_data; disk 796 drivers/block/paride/pd.c disk->access++; disk 798 drivers/block/paride/pd.c if (disk->removable) { disk 799 drivers/block/paride/pd.c pd_special_command(disk, pd_media_check); disk 800 drivers/block/paride/pd.c pd_special_command(disk, pd_door_lock); disk 808 drivers/block/paride/pd.c struct pd_unit *disk = bdev->bd_disk->private_data; disk 810 drivers/block/paride/pd.c if (disk->alt_geom) { disk 813 drivers/block/paride/pd.c geo->cylinders = disk->capacity / (geo->heads * geo->sectors); disk 815 drivers/block/paride/pd.c geo->heads = disk->heads; disk 816 drivers/block/paride/pd.c geo->sectors = disk->sectors; disk 817 drivers/block/paride/pd.c geo->cylinders = disk->cylinders; disk 826 drivers/block/paride/pd.c struct pd_unit *disk = bdev->bd_disk->private_data; disk 831 drivers/block/paride/pd.c if (disk->access == 1) disk 832 drivers/block/paride/pd.c pd_special_command(disk, pd_eject); disk 842 drivers/block/paride/pd.c struct pd_unit *disk = p->private_data; disk 845 drivers/block/paride/pd.c if (!--disk->access && disk->removable) disk 846 drivers/block/paride/pd.c pd_special_command(disk, pd_door_unlock); disk 852 drivers/block/paride/pd.c struct pd_unit *disk = p->private_data; disk 854 drivers/block/paride/pd.c if (!disk->removable) disk 856 drivers/block/paride/pd.c pd_special_command(disk, pd_media_check); disk 857 drivers/block/paride/pd.c r = disk->changed; disk 858 drivers/block/paride/pd.c disk->changed = 0; disk 864 drivers/block/paride/pd.c struct pd_unit *disk = p->private_data; disk 865 drivers/block/paride/pd.c if (pd_special_command(disk, pd_identify) == 0) disk 866 drivers/block/paride/pd.c set_capacity(p, disk->capacity); disk 888 drivers/block/paride/pd.c static void pd_probe_drive(struct pd_unit *disk) disk 896 drivers/block/paride/pd.c strcpy(p->disk_name, disk->name); disk 899 drivers/block/paride/pd.c p->first_minor = (disk - pd) << PD_BITS; disk 901 drivers/block/paride/pd.c disk->gd = p; disk 902 drivers/block/paride/pd.c p->private_data = disk; disk 904 drivers/block/paride/pd.c memset(&disk->tag_set, 0, sizeof(disk->tag_set)); disk 905 drivers/block/paride/pd.c disk->tag_set.ops = &pd_mq_ops; disk 906 drivers/block/paride/pd.c disk->tag_set.cmd_size = sizeof(struct pd_req); disk 907 drivers/block/paride/pd.c disk->tag_set.nr_hw_queues = 1; disk 908 drivers/block/paride/pd.c disk->tag_set.nr_maps = 1; disk 909 drivers/block/paride/pd.c disk->tag_set.queue_depth = 2; disk 910 drivers/block/paride/pd.c disk->tag_set.numa_node = NUMA_NO_NODE; disk 911 drivers/block/paride/pd.c disk->tag_set.flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_BLOCKING; disk 913 drivers/block/paride/pd.c if (blk_mq_alloc_tag_set(&disk->tag_set)) disk 916 drivers/block/paride/pd.c p->queue = blk_mq_init_queue(&disk->tag_set); disk 918 drivers/block/paride/pd.c blk_mq_free_tag_set(&disk->tag_set); disk 923 drivers/block/paride/pd.c p->queue->queuedata = disk; disk 927 drivers/block/paride/pd.c if (disk->drive == -1) { disk 928 drivers/block/paride/pd.c for (disk->drive = 0; disk->drive <= 1; disk->drive++) disk 929 drivers/block/paride/pd.c if (pd_special_command(disk, pd_identify) == 0) disk 931 drivers/block/paride/pd.c } else if (pd_special_command(disk, pd_identify) == 0) disk 933 drivers/block/paride/pd.c disk->gd = NULL; disk 940 drivers/block/paride/pd.c struct pd_unit *disk; disk 944 drivers/block/paride/pd.c struct pd_unit *disk = pd + unit; disk 945 drivers/block/paride/pd.c disk->pi = &disk->pia; disk 946 drivers/block/paride/pd.c disk->access = 0; disk 947 drivers/block/paride/pd.c disk->changed = 1; disk 948 drivers/block/paride/pd.c disk->capacity = 0; disk 949 drivers/block/paride/pd.c disk->drive = parm[D_SLV]; disk 950 drivers/block/paride/pd.c snprintf(disk->name, PD_NAMELEN, "%s%c", name, 'a'+unit); disk 951 drivers/block/paride/pd.c disk->alt_geom = parm[D_GEO]; disk 952 drivers/block/paride/pd.c disk->standby = parm[D_SBY]; disk 955 drivers/block/paride/pd.c INIT_LIST_HEAD(&disk->rq_list); disk 965 drivers/block/paride/pd.c disk = pd; disk 966 drivers/block/paride/pd.c if (pi_init(disk->pi, 1, -1, -1, -1, -1, -1, pd_scratch, disk 967 drivers/block/paride/pd.c PI_PD, verbose, disk->name)) { disk 968 drivers/block/paride/pd.c pd_probe_drive(disk); disk 969 drivers/block/paride/pd.c if (!disk->gd) disk 970 drivers/block/paride/pd.c pi_release(disk->pi); disk 974 drivers/block/paride/pd.c for (unit = 0, disk = pd; unit < PD_UNITS; unit++, disk++) { disk 978 drivers/block/paride/pd.c if (pi_init(disk->pi, 0, parm[D_PRT], parm[D_MOD], disk 980 drivers/block/paride/pd.c pd_scratch, PI_PD, verbose, disk->name)) { disk 981 drivers/block/paride/pd.c pd_probe_drive(disk); disk 982 drivers/block/paride/pd.c if (!disk->gd) disk 983 drivers/block/paride/pd.c pi_release(disk->pi); disk 987 drivers/block/paride/pd.c for (unit = 0, disk = pd; unit < PD_UNITS; unit++, disk++) { disk 988 drivers/block/paride/pd.c if (disk->gd) { disk 989 drivers/block/paride/pd.c set_capacity(disk->gd, disk->capacity); disk 990 drivers/block/paride/pd.c add_disk(disk->gd); disk 1024 drivers/block/paride/pd.c struct pd_unit *disk; disk 1027 drivers/block/paride/pd.c for (unit = 0, disk = pd; unit < PD_UNITS; unit++, disk++) { disk 1028 drivers/block/paride/pd.c struct gendisk *p = disk->gd; disk 1030 drivers/block/paride/pd.c disk->gd = NULL; disk 1033 drivers/block/paride/pd.c blk_mq_free_tag_set(&disk->tag_set); disk 1035 drivers/block/paride/pd.c pi_release(disk->pi); disk 215 drivers/block/paride/pf.c static void pf_release(struct gendisk *disk, fmode_t mode); disk 241 drivers/block/paride/pf.c struct gendisk *disk; disk 251 drivers/block/paride/pf.c static unsigned int pf_check_events(struct gendisk *disk, disk 294 drivers/block/paride/pf.c struct gendisk *disk; disk 296 drivers/block/paride/pf.c disk = alloc_disk(1); disk 297 drivers/block/paride/pf.c if (!disk) disk 300 drivers/block/paride/pf.c disk->queue = blk_mq_init_sq_queue(&pf->tag_set, &pf_mq_ops, disk 302 drivers/block/paride/pf.c if (IS_ERR(disk->queue)) { disk 303 drivers/block/paride/pf.c disk->queue = NULL; disk 304 drivers/block/paride/pf.c put_disk(disk); disk 309 drivers/block/paride/pf.c disk->queue->queuedata = pf; disk 310 drivers/block/paride/pf.c blk_queue_max_segments(disk->queue, cluster); disk 311 drivers/block/paride/pf.c blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH); disk 312 drivers/block/paride/pf.c pf->disk = disk; disk 318 drivers/block/paride/pf.c disk->major = major; disk 319 drivers/block/paride/pf.c disk->first_minor = unit; disk 320 drivers/block/paride/pf.c strcpy(disk->disk_name, pf->name); disk 321 drivers/block/paride/pf.c disk->fops = &pf_fops; disk 322 drivers/block/paride/pf.c disk->events = DISK_EVENT_MEDIA_CHANGE; disk 356 drivers/block/paride/pf.c sector_t capacity = get_capacity(pf->disk); disk 387 drivers/block/paride/pf.c static void pf_release(struct gendisk *disk, fmode_t mode) disk 389 drivers/block/paride/pf.c struct pf_unit *pf = disk->private_data; disk 406 drivers/block/paride/pf.c static unsigned int pf_check_events(struct gendisk *disk, unsigned int clearing) disk 637 drivers/block/paride/pf.c set_capacity(pf->disk, xl(buf, 0) + 1); disk 640 drivers/block/paride/pf.c set_capacity(pf->disk, 0); disk 690 drivers/block/paride/pf.c (unsigned long long)get_capacity(pf->disk)); disk 739 drivers/block/paride/pf.c if (!pf_probe(pf) && pf->disk) { disk 754 drivers/block/paride/pf.c if (pf->disk && !pf_probe(pf)) { disk 766 drivers/block/paride/pf.c if (!pf->disk) disk 768 drivers/block/paride/pf.c blk_cleanup_queue(pf->disk->queue); disk 769 drivers/block/paride/pf.c pf->disk->queue = NULL; disk 771 drivers/block/paride/pf.c put_disk(pf->disk); disk 1036 drivers/block/paride/pf.c if (!pf->disk) disk 1038 drivers/block/paride/pf.c blk_cleanup_queue(pf->disk->queue); disk 1040 drivers/block/paride/pf.c put_disk(pf->disk); disk 1046 drivers/block/paride/pf.c struct gendisk *disk = pf->disk; disk 1050 drivers/block/paride/pf.c disk->private_data = pf; disk 1051 drivers/block/paride/pf.c add_disk(disk); disk 1062 drivers/block/paride/pf.c if (!pf->disk) disk 1066 drivers/block/paride/pf.c del_gendisk(pf->disk); disk 1068 drivers/block/paride/pf.c blk_cleanup_queue(pf->disk->queue); disk 1070 drivers/block/paride/pf.c put_disk(pf->disk); disk 1246 drivers/block/pktcdvd.c clear_bdi_congested(pd->disk->queue->backing_dev_info, disk 2193 drivers/block/pktcdvd.c set_capacity(pd->disk, lba << 2); disk 2304 drivers/block/pktcdvd.c static void pkt_close(struct gendisk *disk, fmode_t mode) disk 2306 drivers/block/pktcdvd.c struct pktcdvd_device *pd = disk->private_data; disk 2494 drivers/block/pktcdvd.c struct request_queue *q = pd->disk->queue; disk 2666 drivers/block/pktcdvd.c static unsigned int pkt_check_events(struct gendisk *disk, disk 2669 drivers/block/pktcdvd.c struct pktcdvd_device *pd = disk->private_data; disk 2703 drivers/block/pktcdvd.c struct gendisk *disk; disk 2741 drivers/block/pktcdvd.c disk = alloc_disk(1); disk 2742 drivers/block/pktcdvd.c if (!disk) disk 2744 drivers/block/pktcdvd.c pd->disk = disk; disk 2745 drivers/block/pktcdvd.c disk->major = pktdev_major; disk 2746 drivers/block/pktcdvd.c disk->first_minor = idx; disk 2747 drivers/block/pktcdvd.c disk->fops = &pktcdvd_ops; disk 2748 drivers/block/pktcdvd.c disk->flags = GENHD_FL_REMOVABLE; disk 2749 drivers/block/pktcdvd.c strcpy(disk->disk_name, pd->name); disk 2750 drivers/block/pktcdvd.c disk->devnode = pktcdvd_devnode; disk 2751 drivers/block/pktcdvd.c disk->private_data = pd; disk 2752 drivers/block/pktcdvd.c disk->queue = blk_alloc_queue(GFP_KERNEL); disk 2753 drivers/block/pktcdvd.c if (!disk->queue) disk 2762 drivers/block/pktcdvd.c disk->events = pd->bdev->bd_disk->events; disk 2764 drivers/block/pktcdvd.c add_disk(disk); disk 2777 drivers/block/pktcdvd.c put_disk(disk); disk 2826 drivers/block/pktcdvd.c del_gendisk(pd->disk); disk 2827 drivers/block/pktcdvd.c blk_cleanup_queue(pd->disk->queue); disk 2828 drivers/block/pktcdvd.c put_disk(pd->disk); disk 391 drivers/block/rbd.c struct gendisk *disk; /* blkdev's gendisk and rq */ disk 598 drivers/block/rbd.c else if (rbd_dev->disk) disk 600 drivers/block/rbd.c RBD_DRV_NAME, rbd_dev->disk->disk_name, &vaf); disk 678 drivers/block/rbd.c static void rbd_release(struct gendisk *disk, fmode_t mode) disk 680 drivers/block/rbd.c struct rbd_device *rbd_dev = disk->private_data; disk 4922 drivers/block/rbd.c blk_cleanup_queue(rbd_dev->disk->queue); disk 4924 drivers/block/rbd.c put_disk(rbd_dev->disk); disk 4925 drivers/block/rbd.c rbd_dev->disk = NULL; disk 5064 drivers/block/rbd.c set_capacity(rbd_dev->disk, size); disk 5065 drivers/block/rbd.c revalidate_disk(rbd_dev->disk); disk 5122 drivers/block/rbd.c struct gendisk *disk; disk 5129 drivers/block/rbd.c disk = alloc_disk(single_major ? disk 5132 drivers/block/rbd.c if (!disk) disk 5135 drivers/block/rbd.c snprintf(disk->disk_name, sizeof(disk->disk_name), RBD_DRV_NAME "%d", disk 5137 drivers/block/rbd.c disk->major = rbd_dev->major; disk 5138 drivers/block/rbd.c disk->first_minor = rbd_dev->minor; disk 5140 drivers/block/rbd.c disk->flags |= GENHD_FL_EXT_DEVT; disk 5141 drivers/block/rbd.c disk->fops = &rbd_bd_ops; disk 5142 drivers/block/rbd.c disk->private_data = rbd_dev; disk 5187 drivers/block/rbd.c disk->queue = q; disk 5190 drivers/block/rbd.c rbd_dev->disk = disk; disk 5196 drivers/block/rbd.c put_disk(disk); disk 5973 drivers/block/rbd.c rbd_dev->disk->disk_name); disk 6895 drivers/block/rbd.c set_capacity(rbd_dev->disk, rbd_dev->mapping.size / SECTOR_SIZE); disk 6896 drivers/block/rbd.c set_disk_ro(rbd_dev->disk, rbd_dev->opts->read_only); disk 7128 drivers/block/rbd.c add_disk(rbd_dev->disk); disk 7130 drivers/block/rbd.c blk_put_queue(rbd_dev->disk->queue); disk 7136 drivers/block/rbd.c pr_info("%s: capacity %llu features 0x%llx\n", rbd_dev->disk->disk_name, disk 7137 drivers/block/rbd.c (unsigned long long)get_capacity(rbd_dev->disk) << SECTOR_SHIFT, disk 7254 drivers/block/rbd.c blk_mq_freeze_queue(rbd_dev->disk->queue); disk 7255 drivers/block/rbd.c blk_set_queue_dying(rbd_dev->disk->queue); disk 7258 drivers/block/rbd.c del_gendisk(rbd_dev->disk); disk 216 drivers/block/skd_main.c struct gendisk *disk; disk 1141 drivers/block/skd_main.c set_capacity(skdev->disk, skdev->read_cap_last_lba + 1); disk 1149 drivers/block/skd_main.c set_capacity(skdev->disk, skdev->read_cap_last_lba + 1); disk 2817 drivers/block/skd_main.c struct gendisk *disk; disk 2821 drivers/block/skd_main.c disk = alloc_disk(SKD_MINORS_PER_DEVICE); disk 2822 drivers/block/skd_main.c if (!disk) { disk 2827 drivers/block/skd_main.c skdev->disk = disk; disk 2828 drivers/block/skd_main.c sprintf(disk->disk_name, DRV_NAME "%u", skdev->devno); disk 2830 drivers/block/skd_main.c disk->major = skdev->major; disk 2831 drivers/block/skd_main.c disk->first_minor = skdev->devno * SKD_MINORS_PER_DEVICE; disk 2832 drivers/block/skd_main.c disk->fops = &skd_blockdev_ops; disk 2833 drivers/block/skd_main.c disk->private_data = skdev; disk 2857 drivers/block/skd_main.c disk->queue = q; disk 3036 drivers/block/skd_main.c struct gendisk *disk = skdev->disk; disk 3038 drivers/block/skd_main.c if (disk && (disk->flags & GENHD_FL_UP)) disk 3039 drivers/block/skd_main.c del_gendisk(disk); disk 3044 drivers/block/skd_main.c if (disk) disk 3045 drivers/block/skd_main.c disk->queue = NULL; disk 3051 drivers/block/skd_main.c put_disk(disk); disk 3052 drivers/block/skd_main.c skdev->disk = NULL; disk 3099 drivers/block/skd_main.c capacity = get_capacity(skdev->disk); disk 3112 drivers/block/skd_main.c device_add_disk(parent, skdev->disk, NULL); disk 60 drivers/block/sunvdc.c struct gendisk *disk; disk 125 drivers/block/sunvdc.c struct gendisk *disk = bdev->bd_disk; disk 126 drivers/block/sunvdc.c sector_t nsect = get_capacity(disk); disk 147 drivers/block/sunvdc.c struct gendisk *disk; disk 158 drivers/block/sunvdc.c disk = bdev->bd_disk; disk 160 drivers/block/sunvdc.c if (bdev->bd_disk && (disk->flags & GENHD_FL_CD)) disk 184 drivers/block/sunvdc.c if (port->disk && vdc_tx_dring_avail(dr) * 100 / VDC_TX_RING_SIZE >= 50) disk 185 drivers/block/sunvdc.c blk_mq_start_stopped_hw_queues(port->disk->queue, true); disk 854 drivers/block/sunvdc.c port->disk = g; disk 1078 drivers/block/sunvdc.c blk_mq_stop_hw_queues(port->disk->queue); disk 1084 drivers/block/sunvdc.c del_gendisk(port->disk); disk 1085 drivers/block/sunvdc.c cleanup_queue(port->disk->queue); disk 1086 drivers/block/sunvdc.c put_disk(port->disk); disk 1087 drivers/block/sunvdc.c port->disk = NULL; disk 1126 drivers/block/sunvdc.c struct request_queue *q = port->disk->queue; disk 1183 drivers/block/sunvdc.c blk_mq_stop_hw_queues(port->disk->queue); disk 188 drivers/block/swim.c struct gendisk *disk; disk 635 drivers/block/swim.c set_capacity(fs->disk, fs->total_secs); disk 670 drivers/block/swim.c static void floppy_release(struct gendisk *disk, fmode_t mode) disk 672 drivers/block/swim.c struct floppy_state *fs = disk->private_data; disk 730 drivers/block/swim.c static unsigned int floppy_check_events(struct gendisk *disk, disk 733 drivers/block/swim.c struct floppy_state *fs = disk->private_data; disk 738 drivers/block/swim.c static int floppy_revalidate(struct gendisk *disk) disk 740 drivers/block/swim.c struct floppy_state *fs = disk->private_data; disk 775 drivers/block/swim.c return get_disk_and_module(swd->unit[drive].disk); disk 835 drivers/block/swim.c swd->unit[drive].disk = alloc_disk(1); disk 836 drivers/block/swim.c if (swd->unit[drive].disk == NULL) { disk 848 drivers/block/swim.c swd->unit[drive].disk->queue = q; disk 849 drivers/block/swim.c blk_queue_bounce_limit(swd->unit[drive].disk->queue, disk 851 drivers/block/swim.c swd->unit[drive].disk->queue->queuedata = &swd->unit[drive]; disk 856 drivers/block/swim.c swd->unit[drive].disk->flags = GENHD_FL_REMOVABLE; disk 857 drivers/block/swim.c swd->unit[drive].disk->major = FLOPPY_MAJOR; disk 858 drivers/block/swim.c swd->unit[drive].disk->first_minor = drive; disk 859 drivers/block/swim.c sprintf(swd->unit[drive].disk->disk_name, "fd%d", drive); disk 860 drivers/block/swim.c swd->unit[drive].disk->fops = &floppy_fops; disk 861 drivers/block/swim.c swd->unit[drive].disk->events = DISK_EVENT_MEDIA_CHANGE; disk 862 drivers/block/swim.c swd->unit[drive].disk->private_data = &swd->unit[drive]; disk 863 drivers/block/swim.c set_capacity(swd->unit[drive].disk, 2880); disk 864 drivers/block/swim.c add_disk(swd->unit[drive].disk); disk 875 drivers/block/swim.c struct gendisk *disk = swd->unit[drive].disk; disk 877 drivers/block/swim.c if (disk) { disk 878 drivers/block/swim.c if (disk->queue) { disk 879 drivers/block/swim.c blk_cleanup_queue(disk->queue); disk 880 drivers/block/swim.c disk->queue = NULL; disk 883 drivers/block/swim.c put_disk(disk); disk 956 drivers/block/swim.c del_gendisk(swd->unit[drive].disk); disk 957 drivers/block/swim.c blk_cleanup_queue(swd->unit[drive].disk->queue); disk 959 drivers/block/swim.c put_disk(swd->unit[drive].disk); disk 252 drivers/block/swim3.c static void floppy_release(struct gendisk *disk, fmode_t mode); disk 253 drivers/block/swim3.c static unsigned int floppy_check_events(struct gendisk *disk, disk 255 drivers/block/swim3.c static int floppy_revalidate(struct gendisk *disk); disk 988 drivers/block/swim3.c static void floppy_release(struct gendisk *disk, fmode_t mode) disk 990 drivers/block/swim3.c struct floppy_state *fs = disk->private_data; disk 1006 drivers/block/swim3.c static unsigned int floppy_check_events(struct gendisk *disk, disk 1009 drivers/block/swim3.c struct floppy_state *fs = disk->private_data; disk 1013 drivers/block/swim3.c static int floppy_revalidate(struct gendisk *disk) disk 1015 drivers/block/swim3.c struct floppy_state *fs = disk->private_data; disk 1176 drivers/block/swim3.c struct gendisk *disk; disk 1188 drivers/block/swim3.c disk = alloc_disk(1); disk 1189 drivers/block/swim3.c if (disk == NULL) { disk 1197 drivers/block/swim3.c disk->queue = blk_mq_init_sq_queue(&fs->tag_set, &swim3_mq_ops, 2, disk 1199 drivers/block/swim3.c if (IS_ERR(disk->queue)) { disk 1200 drivers/block/swim3.c rc = PTR_ERR(disk->queue); disk 1201 drivers/block/swim3.c disk->queue = NULL; disk 1204 drivers/block/swim3.c blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH); disk 1205 drivers/block/swim3.c disk->queue->queuedata = fs; disk 1211 drivers/block/swim3.c disk->major = FLOPPY_MAJOR; disk 1212 drivers/block/swim3.c disk->first_minor = floppy_count; disk 1213 drivers/block/swim3.c disk->fops = &floppy_fops; disk 1214 drivers/block/swim3.c disk->private_data = fs; disk 1215 drivers/block/swim3.c disk->events = DISK_EVENT_MEDIA_CHANGE; disk 1216 drivers/block/swim3.c disk->flags |= GENHD_FL_REMOVABLE; disk 1217 drivers/block/swim3.c sprintf(disk->disk_name, "fd%d", floppy_count); disk 1218 drivers/block/swim3.c set_capacity(disk, 2880); disk 1219 drivers/block/swim3.c add_disk(disk); disk 1221 drivers/block/swim3.c disks[floppy_count++] = disk; disk 1225 drivers/block/swim3.c blk_cleanup_queue(disk->queue); disk 1226 drivers/block/swim3.c disk->queue = NULL; disk 1229 drivers/block/swim3.c put_disk(disk); disk 244 drivers/block/sx8.c struct gendisk *disk; disk 1181 drivers/block/sx8.c struct gendisk *disk = port->disk; disk 1183 drivers/block/sx8.c set_capacity(disk, port->capacity); disk 1184 drivers/block/sx8.c add_disk(disk); disk 1345 drivers/block/sx8.c struct gendisk *disk; disk 1351 drivers/block/sx8.c disk = alloc_disk(CARM_MINORS_PER_MAJOR); disk 1352 drivers/block/sx8.c if (!disk) disk 1355 drivers/block/sx8.c port->disk = disk; disk 1356 drivers/block/sx8.c sprintf(disk->disk_name, DRV_NAME "/%u", disk 1358 drivers/block/sx8.c disk->major = host->major; disk 1359 drivers/block/sx8.c disk->first_minor = port_no * CARM_MINORS_PER_MAJOR; disk 1360 drivers/block/sx8.c disk->fops = &carm_bd_ops; disk 1361 drivers/block/sx8.c disk->private_data = port; disk 1371 drivers/block/sx8.c disk->queue = q; disk 1378 drivers/block/sx8.c struct gendisk *disk = port->disk; disk 1380 drivers/block/sx8.c if (!disk) disk 1383 drivers/block/sx8.c if (disk->flags & GENHD_FL_UP) disk 1384 drivers/block/sx8.c del_gendisk(disk); disk 1385 drivers/block/sx8.c if (disk->queue) disk 1386 drivers/block/sx8.c blk_cleanup_queue(disk->queue); disk 1387 drivers/block/sx8.c put_disk(disk); disk 756 drivers/block/umem.c static int mm_revalidate(struct gendisk *disk) disk 758 drivers/block/umem.c struct cardinfo *card = disk->private_data; disk 759 drivers/block/umem.c set_capacity(disk, card->mm_size << 1); disk 1082 drivers/block/umem.c struct gendisk *disk = mm_gendisk[i]; disk 1083 drivers/block/umem.c sprintf(disk->disk_name, "umem%c", 'a'+i); disk 1085 drivers/block/umem.c disk->major = major_nr; disk 1086 drivers/block/umem.c disk->first_minor = i << MM_SHIFT; disk 1087 drivers/block/umem.c disk->fops = &mm_fops; disk 1088 drivers/block/umem.c disk->private_data = &cards[i]; disk 1089 drivers/block/umem.c disk->queue = cards[i].queue; disk 1090 drivers/block/umem.c set_capacity(disk, cards[i].mm_size << 1); disk 1091 drivers/block/umem.c add_disk(disk); disk 48 drivers/block/virtio_blk.c struct gendisk *disk; disk 146 drivers/block/virtio_blk.c struct gendisk *disk = bdev->bd_disk; disk 147 drivers/block/virtio_blk.c struct virtio_blk *vblk = disk->private_data; disk 269 drivers/block/virtio_blk.c blk_mq_start_stopped_hw_queues(vblk->disk->queue, true); disk 385 drivers/block/virtio_blk.c static int virtblk_get_id(struct gendisk *disk, char *id_str) disk 387 drivers/block/virtio_blk.c struct virtio_blk *vblk = disk->private_data; disk 388 drivers/block/virtio_blk.c struct request_queue *q = vblk->disk->queue; disk 400 drivers/block/virtio_blk.c blk_execute_rq(vblk->disk->queue, vblk->disk, req, false); disk 437 drivers/block/virtio_blk.c static void virtblk_release(struct gendisk *disk, fmode_t mode) disk 439 drivers/block/virtio_blk.c struct virtio_blk *vblk = disk->private_data; disk 497 drivers/block/virtio_blk.c struct gendisk *disk = dev_to_disk(dev); disk 504 drivers/block/virtio_blk.c err = virtblk_get_id(disk, buf); disk 520 drivers/block/virtio_blk.c struct request_queue *q = vblk->disk->queue; disk 544 drivers/block/virtio_blk.c vblk->disk->disk_name, disk 551 drivers/block/virtio_blk.c set_capacity(vblk->disk, capacity); disk 561 drivers/block/virtio_blk.c revalidate_disk(vblk->disk); disk 562 drivers/block/virtio_blk.c kobject_uevent_env(&disk_to_dev(vblk->disk)->kobj, KOBJ_CHANGE, envp); disk 681 drivers/block/virtio_blk.c blk_queue_write_cache(vblk->disk->queue, writeback, false); disk 682 drivers/block/virtio_blk.c revalidate_disk(vblk->disk); disk 693 drivers/block/virtio_blk.c struct gendisk *disk = dev_to_disk(dev); disk 694 drivers/block/virtio_blk.c struct virtio_blk *vblk = disk->private_data; disk 711 drivers/block/virtio_blk.c struct gendisk *disk = dev_to_disk(dev); disk 712 drivers/block/virtio_blk.c struct virtio_blk *vblk = disk->private_data; disk 731 drivers/block/virtio_blk.c struct gendisk *disk = dev_to_disk(dev); disk 732 drivers/block/virtio_blk.c struct virtio_blk *vblk = disk->private_data; disk 849 drivers/block/virtio_blk.c vblk->disk = alloc_disk(1 << PART_BITS); disk 850 drivers/block/virtio_blk.c if (!vblk->disk) { disk 883 drivers/block/virtio_blk.c vblk->disk->queue = q; disk 887 drivers/block/virtio_blk.c virtblk_name_format("vd", index, vblk->disk->disk_name, DISK_NAME_LEN); disk 889 drivers/block/virtio_blk.c vblk->disk->major = major; disk 890 drivers/block/virtio_blk.c vblk->disk->first_minor = index_to_minor(index); disk 891 drivers/block/virtio_blk.c vblk->disk->private_data = vblk; disk 892 drivers/block/virtio_blk.c vblk->disk->fops = &virtblk_fops; disk 893 drivers/block/virtio_blk.c vblk->disk->flags |= GENHD_FL_EXT_DEVT; disk 901 drivers/block/virtio_blk.c set_disk_ro(vblk->disk, 1); disk 984 drivers/block/virtio_blk.c device_add_disk(&vdev->dev, vblk->disk, virtblk_attr_groups); disk 990 drivers/block/virtio_blk.c put_disk(vblk->disk); disk 1008 drivers/block/virtio_blk.c del_gendisk(vblk->disk); disk 1009 drivers/block/virtio_blk.c blk_cleanup_queue(vblk->disk->queue); disk 1021 drivers/block/virtio_blk.c put_disk(vblk->disk); disk 1041 drivers/block/virtio_blk.c blk_mq_quiesce_queue(vblk->disk->queue); disk 1058 drivers/block/virtio_blk.c blk_mq_unquiesce_queue(vblk->disk->queue); disk 2500 drivers/block/xen-blkfront.c struct gendisk *disk; disk 2511 drivers/block/xen-blkfront.c disk = info->gd; disk 2512 drivers/block/xen-blkfront.c if (disk) disk 2513 drivers/block/xen-blkfront.c bdev = bdget_disk(disk, 0); disk 2532 drivers/block/xen-blkfront.c info = disk->private_data; disk 2534 drivers/block/xen-blkfront.c dev_warn(disk_to_dev(disk), disk 2540 drivers/block/xen-blkfront.c disk->private_data = NULL; disk 2561 drivers/block/xen-blkfront.c struct gendisk *disk = bdev->bd_disk; disk 2567 drivers/block/xen-blkfront.c info = disk->private_data; disk 2587 drivers/block/xen-blkfront.c static void blkif_release(struct gendisk *disk, fmode_t mode) disk 2589 drivers/block/xen-blkfront.c struct blkfront_info *info = disk->private_data; disk 2595 drivers/block/xen-blkfront.c bdev = bdget_disk(disk, 0); disk 2598 drivers/block/xen-blkfront.c WARN(1, "Block device %s yanked out from us!\n", disk->disk_name); disk 2625 drivers/block/xen-blkfront.c disk->private_data = NULL; disk 931 drivers/block/xsysace.c static void ace_release(struct gendisk *disk, fmode_t mode) disk 933 drivers/block/xsysace.c struct ace_device *ace = disk->private_data; disk 313 drivers/block/z2ram.c z2_release(struct gendisk *disk, fmode_t mode) disk 407 drivers/block/zram/zram_drv.c zram->disk->queue->backing_dev_info->capabilities |= disk 527 drivers/block/zram/zram_drv.c zram->disk->queue->backing_dev_info->capabilities &= disk 929 drivers/block/zram/zram_drv.c zram->debugfs_dir = debugfs_create_dir(zram->disk->disk_name, disk 1149 drivers/block/zram/zram_drv.c zram->mem_pool = zs_create_pool(zram->disk->disk_name); disk 1510 drivers/block/zram/zram_drv.c struct request_queue *q = zram->disk->queue; disk 1514 drivers/block/zram/zram_drv.c &zram->disk->part0); disk 1525 drivers/block/zram/zram_drv.c generic_end_io_acct(q, op, &zram->disk->part0, start_time); disk 1694 drivers/block/zram/zram_drv.c set_capacity(zram->disk, 0); disk 1695 drivers/block/zram/zram_drv.c part_stat_set_all(&zram->disk->part0, 0); disk 1740 drivers/block/zram/zram_drv.c set_capacity(zram->disk, zram->disksize >> SECTOR_SHIFT); disk 1742 drivers/block/zram/zram_drv.c revalidate_disk(zram->disk); disk 1770 drivers/block/zram/zram_drv.c bdev = bdget_disk(zram->disk, 0); disk 1789 drivers/block/zram/zram_drv.c revalidate_disk(zram->disk); disk 1905 drivers/block/zram/zram_drv.c zram->disk = alloc_disk(1); disk 1906 drivers/block/zram/zram_drv.c if (!zram->disk) { disk 1913 drivers/block/zram/zram_drv.c zram->disk->major = zram_major; disk 1914 drivers/block/zram/zram_drv.c zram->disk->first_minor = device_id; disk 1915 drivers/block/zram/zram_drv.c zram->disk->fops = &zram_devops; disk 1916 drivers/block/zram/zram_drv.c zram->disk->queue = queue; disk 1917 drivers/block/zram/zram_drv.c zram->disk->queue->queuedata = zram; disk 1918 drivers/block/zram/zram_drv.c zram->disk->private_data = zram; disk 1919 drivers/block/zram/zram_drv.c snprintf(zram->disk->disk_name, 16, "zram%d", device_id); disk 1922 drivers/block/zram/zram_drv.c set_capacity(zram->disk, 0); disk 1924 drivers/block/zram/zram_drv.c blk_queue_flag_set(QUEUE_FLAG_NONROT, zram->disk->queue); disk 1925 drivers/block/zram/zram_drv.c blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, zram->disk->queue); disk 1931 drivers/block/zram/zram_drv.c blk_queue_physical_block_size(zram->disk->queue, PAGE_SIZE); disk 1932 drivers/block/zram/zram_drv.c blk_queue_logical_block_size(zram->disk->queue, disk 1934 drivers/block/zram/zram_drv.c blk_queue_io_min(zram->disk->queue, PAGE_SIZE); disk 1935 drivers/block/zram/zram_drv.c blk_queue_io_opt(zram->disk->queue, PAGE_SIZE); disk 1936 drivers/block/zram/zram_drv.c zram->disk->queue->limits.discard_granularity = PAGE_SIZE; disk 1937 drivers/block/zram/zram_drv.c blk_queue_max_discard_sectors(zram->disk->queue, UINT_MAX); disk 1938 drivers/block/zram/zram_drv.c blk_queue_flag_set(QUEUE_FLAG_DISCARD, zram->disk->queue); disk 1949 drivers/block/zram/zram_drv.c blk_queue_max_write_zeroes_sectors(zram->disk->queue, UINT_MAX); disk 1951 drivers/block/zram/zram_drv.c zram->disk->queue->backing_dev_info->capabilities |= disk 1953 drivers/block/zram/zram_drv.c device_add_disk(NULL, zram->disk, zram_disk_attr_groups); disk 1958 drivers/block/zram/zram_drv.c pr_info("Added device: %s\n", zram->disk->disk_name); disk 1974 drivers/block/zram/zram_drv.c bdev = bdget_disk(zram->disk, 0); disk 1995 drivers/block/zram/zram_drv.c pr_info("Removed device: %s\n", zram->disk->disk_name); disk 1997 drivers/block/zram/zram_drv.c del_gendisk(zram->disk); disk 1998 drivers/block/zram/zram_drv.c blk_cleanup_queue(zram->disk->queue); disk 1999 drivers/block/zram/zram_drv.c put_disk(zram->disk); disk 96 drivers/block/zram/zram_drv.h struct gendisk *disk; disk 629 drivers/cdrom/cdrom.c if (cdi->disk) disk 2176 drivers/cdrom/cdrom.c struct request_queue *q = cdi->disk->queue; disk 2231 drivers/cdrom/cdrom.c blk_execute_rq(q, cdi->disk, rq, 0); disk 97 drivers/cdrom/gdrom.c struct gendisk *disk; disk 490 drivers/cdrom/gdrom.c static void gdrom_bdops_release(struct gendisk *disk, fmode_t mode) disk 497 drivers/cdrom/gdrom.c static unsigned int gdrom_bdops_check_events(struct gendisk *disk, disk 715 drivers/cdrom/gdrom.c gd.disk->major = gdrom_major; disk 716 drivers/cdrom/gdrom.c gd.disk->first_minor = 1; disk 717 drivers/cdrom/gdrom.c gd.disk->minors = 1; disk 718 drivers/cdrom/gdrom.c strcpy(gd.disk->disk_name, GDROM_DEV_NAME); disk 728 drivers/cdrom/gdrom.c gd.disk->queue = gd.gdrom_rq; disk 764 drivers/cdrom/gdrom.c gd.disk = alloc_disk(1); disk 765 drivers/cdrom/gdrom.c if (!gd.disk) { disk 774 drivers/cdrom/gdrom.c gd.disk->fops = &gdrom_bdops; disk 775 drivers/cdrom/gdrom.c gd.disk->events = DISK_EVENT_MEDIA_CHANGE; disk 800 drivers/cdrom/gdrom.c add_disk(gd.disk); disk 811 drivers/cdrom/gdrom.c del_gendisk(gd.disk); disk 827 drivers/cdrom/gdrom.c del_gendisk(gd.disk); disk 1375 drivers/char/random.c void add_disk_randomness(struct gendisk *disk) disk 1377 drivers/char/random.c if (!disk || !disk->random) disk 1380 drivers/char/random.c add_timer_randomness(disk->random, 0x100 + disk_devt(disk)); disk 1381 drivers/char/random.c trace_add_disk_randomness(disk_devt(disk), ENTROPY_BITS(&input_pool)); disk 1970 drivers/char/random.c void rand_initialize_disk(struct gendisk *disk) disk 1981 drivers/char/random.c disk->random = state; disk 90 drivers/ide/ide-atapi.c int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk, disk 110 drivers/ide/ide-atapi.c blk_execute_rq(drive->queue, disk, rq, 0); disk 118 drivers/ide/ide-atapi.c int ide_do_test_unit_ready(ide_drive_t *drive, struct gendisk *disk) disk 125 drivers/ide/ide-atapi.c return ide_queue_pc_tail(drive, disk, &pc, NULL, 0); disk 129 drivers/ide/ide-atapi.c int ide_do_start_stop(ide_drive_t *drive, struct gendisk *disk, int start) disk 140 drivers/ide/ide-atapi.c return ide_queue_pc_tail(drive, disk, &pc, NULL, 0); disk 144 drivers/ide/ide-atapi.c int ide_set_media_lock(ide_drive_t *drive, struct gendisk *disk, int on) disk 155 drivers/ide/ide-atapi.c return ide_queue_pc_tail(drive, disk, &pc, NULL, 0); disk 59 drivers/ide/ide-cd.c static struct cdrom_info *ide_cd_get(struct gendisk *disk) disk 64 drivers/ide/ide-cd.c cd = ide_drv_g(disk, cdrom_info); disk 202 drivers/ide/ide-cd.c if (sector < get_capacity(info->disk) && disk 204 drivers/ide/ide-cd.c set_capacity(info->disk, sector); disk 469 drivers/ide/ide-cd.c blk_execute_rq(drive->queue, info->disk, rq, 0); disk 814 drivers/ide/ide-cd.c if (get_disk_ro(cd->disk)) disk 1098 drivers/ide/ide-cd.c set_capacity(info->disk, toc->capacity * sectors_per_frame); disk 1214 drivers/ide/ide-cd.c set_capacity(info->disk, toc->capacity * sectors_per_frame); disk 1307 drivers/ide/ide-cd.c devinfo->disk = info->disk; disk 1565 drivers/ide/ide-cd.c del_gendisk(info->disk); disk 1577 drivers/ide/ide-cd.c struct gendisk *g = info->disk; disk 1629 drivers/ide/ide-cd.c static void idecd_release(struct gendisk *disk, fmode_t mode) disk 1631 drivers/ide/ide-cd.c struct cdrom_info *info = ide_drv_g(disk, cdrom_info); disk 1714 drivers/ide/ide-cd.c static unsigned int idecd_check_events(struct gendisk *disk, disk 1717 drivers/ide/ide-cd.c struct cdrom_info *info = ide_drv_g(disk, cdrom_info); disk 1721 drivers/ide/ide-cd.c static int idecd_revalidate_disk(struct gendisk *disk) disk 1723 drivers/ide/ide-cd.c struct cdrom_info *info = ide_drv_g(disk, cdrom_info); disk 1784 drivers/ide/ide-cd.c info->disk = g; disk 79 drivers/ide/ide-cd.h struct gendisk *disk; disk 302 drivers/ide/ide-cd_ioctl.c blk_execute_rq(drive->queue, cd->disk, rq, 0); disk 760 drivers/ide/ide-disk.c static int ide_disk_init_media(ide_drive_t *drive, struct gendisk *disk) disk 765 drivers/ide/ide-disk.c static int ide_disk_set_doorlock(ide_drive_t *drive, struct gendisk *disk, disk 319 drivers/ide/ide-floppy.c struct gendisk *disk = floppy->disk; disk 327 drivers/ide/ide-floppy.c if (ide_queue_pc_tail(drive, disk, pc, buf, pc->req_xfer)) { disk 337 drivers/ide/ide-floppy.c set_disk_ro(disk, !!(drive->dev_flags & IDE_DFLAG_WP)); disk 381 drivers/ide/ide-floppy.c struct gendisk *disk = floppy->disk; disk 396 drivers/ide/ide-floppy.c if (ide_queue_pc_tail(drive, disk, &pc, pc_buf, pc.req_xfer)) { disk 526 drivers/ide/ide-floppy.c static int ide_floppy_init_media(ide_drive_t *drive, struct gendisk *disk) disk 530 drivers/ide/ide-floppy.c if (ide_do_test_unit_ready(drive, disk)) disk 531 drivers/ide/ide-floppy.c ide_do_start_stop(drive, disk, 1); disk 535 drivers/ide/ide-floppy.c set_capacity(disk, ide_gd_capacity(drive)); disk 54 drivers/ide/ide-floppy_ioctl.c if (ide_queue_pc_tail(drive, floppy->disk, pc, pc_buf, pc->req_xfer)) { disk 130 drivers/ide/ide-floppy_ioctl.c if (ide_queue_pc_tail(drive, floppy->disk, pc, buf, pc->req_xfer)) disk 179 drivers/ide/ide-floppy_ioctl.c if (ide_queue_pc_tail(drive, floppy->disk, pc, buf, pc->req_xfer)) disk 208 drivers/ide/ide-floppy_ioctl.c if (ide_queue_pc_tail(drive, floppy->disk, pc, sense_buf, disk 240 drivers/ide/ide-floppy_ioctl.c struct gendisk *disk = floppy->disk; disk 246 drivers/ide/ide-floppy_ioctl.c ide_set_media_lock(drive, disk, prevent); disk 249 drivers/ide/ide-floppy_ioctl.c ide_do_start_stop(drive, disk, 2); disk 34 drivers/ide/ide-gd.c static struct ide_disk_obj *ide_disk_get(struct gendisk *disk) disk 39 drivers/ide/ide-gd.c idkp = ide_drv_g(disk, ide_disk_obj); disk 70 drivers/ide/ide-gd.c struct gendisk *g = idkp->disk; disk 86 drivers/ide/ide-gd.c struct gendisk *g = idkp->disk; disk 186 drivers/ide/ide-gd.c struct gendisk *disk = bdev->bd_disk; disk 191 drivers/ide/ide-gd.c idkp = ide_disk_get(disk); disk 205 drivers/ide/ide-gd.c ret = drive->disk_ops->init_media(drive, disk); disk 227 drivers/ide/ide-gd.c drive->disk_ops->set_doorlock(drive, disk, 1); disk 254 drivers/ide/ide-gd.c static void ide_gd_release(struct gendisk *disk, fmode_t mode) disk 256 drivers/ide/ide-gd.c struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj); disk 266 drivers/ide/ide-gd.c drive->disk_ops->set_doorlock(drive, disk, 0); disk 287 drivers/ide/ide-gd.c static unsigned int ide_gd_check_events(struct gendisk *disk, disk 290 drivers/ide/ide-gd.c struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj); disk 313 drivers/ide/ide-gd.c static void ide_gd_unlock_native_capacity(struct gendisk *disk) disk 315 drivers/ide/ide-gd.c struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj); disk 323 drivers/ide/ide-gd.c static int ide_gd_revalidate_disk(struct gendisk *disk) disk 325 drivers/ide/ide-gd.c struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj); disk 328 drivers/ide/ide-gd.c if (ide_gd_check_events(disk, 0)) disk 331 drivers/ide/ide-gd.c set_capacity(disk, ide_gd_capacity(drive)); disk 404 drivers/ide/ide-gd.c idkp->disk = g; disk 20 drivers/ide/ide-gd.h struct gendisk *disk; disk 948 drivers/ide/ide-probe.c void ide_register_region(struct gendisk *disk) disk 950 drivers/ide/ide-probe.c blk_register_region(MKDEV(disk->major, disk->first_minor), disk 951 drivers/ide/ide-probe.c disk->minors, NULL, exact_match, exact_lock, disk); disk 956 drivers/ide/ide-probe.c void ide_unregister_region(struct gendisk *disk) disk 958 drivers/ide/ide-probe.c blk_unregister_region(MKDEV(disk->major, disk->first_minor), disk 959 drivers/ide/ide-probe.c disk->minors); disk 964 drivers/ide/ide-probe.c void ide_init_disk(struct gendisk *disk, ide_drive_t *drive) disk 969 drivers/ide/ide-probe.c disk->major = hwif->major; disk 970 drivers/ide/ide-probe.c disk->first_minor = unit << PARTN_BITS; disk 971 drivers/ide/ide-probe.c sprintf(disk->disk_name, "hd%c", 'a' + hwif->index * MAX_DRIVES + unit); disk 972 drivers/ide/ide-probe.c disk->queue = drive->queue; disk 143 drivers/ide/ide-tape.c struct gendisk *disk; disk 231 drivers/ide/ide-tape.c static struct ide_tape_obj *ide_tape_get(struct gendisk *disk, bool cdev, disk 241 drivers/ide/ide-tape.c tape = ide_drv_g(disk, ide_tape_obj); disk 686 drivers/ide/ide-tape.c struct gendisk *disk = tape->disk; disk 693 drivers/ide/ide-tape.c if (ide_do_test_unit_ready(drive, disk) == 0) disk 700 drivers/ide/ide-tape.c ide_do_start_stop(drive, disk, IDETAPE_LU_LOAD_MASK); disk 718 drivers/ide/ide-tape.c rc = ide_queue_pc_tail(drive, tape->disk, &pc, NULL, 0); disk 738 drivers/ide/ide-tape.c if (ide_queue_pc_tail(drive, tape->disk, &pc, buf, pc.req_xfer)) disk 806 drivers/ide/ide-tape.c struct gendisk *disk = tape->disk; disk 814 drivers/ide/ide-tape.c ret = ide_queue_pc_tail(drive, disk, &pc, NULL, 0); disk 860 drivers/ide/ide-tape.c rq->rq_disk = tape->disk; disk 870 drivers/ide/ide-tape.c blk_execute_rq(drive->queue, tape->disk, rq, 0); disk 1012 drivers/ide/ide-tape.c struct gendisk *disk = tape->disk; disk 1019 drivers/ide/ide-tape.c ret = ide_queue_pc_tail(drive, disk, &pc, NULL, 0); disk 1067 drivers/ide/ide-tape.c struct gendisk *disk = tape->disk; disk 1096 drivers/ide/ide-tape.c return ide_queue_pc_tail(drive, disk, &pc, NULL, 0); disk 1234 drivers/ide/ide-tape.c if (ide_queue_pc_tail(drive, tape->disk, &pc, NULL, 0)) { disk 1257 drivers/ide/ide-tape.c struct gendisk *disk = tape->disk; disk 1294 drivers/ide/ide-tape.c return ide_do_start_stop(drive, disk, IDETAPE_LU_LOAD_MASK); disk 1302 drivers/ide/ide-tape.c if (!ide_set_media_lock(drive, disk, 0)) disk 1306 drivers/ide/ide-tape.c retval = ide_do_start_stop(drive, disk, !IDETAPE_LU_LOAD_MASK); disk 1316 drivers/ide/ide-tape.c return ide_do_start_stop(drive, disk, disk 1320 drivers/ide/ide-tape.c return ide_queue_pc_tail(drive, disk, &pc, NULL, 0); disk 1324 drivers/ide/ide-tape.c return ide_queue_pc_tail(drive, disk, &pc, NULL, 0); disk 1347 drivers/ide/ide-tape.c retval = ide_set_media_lock(drive, disk, 1); disk 1353 drivers/ide/ide-tape.c retval = ide_set_media_lock(drive, disk, 0); disk 1446 drivers/ide/ide-tape.c if (ide_queue_pc_tail(drive, tape->disk, &pc, buf, pc.req_xfer)) { disk 1532 drivers/ide/ide-tape.c if (!ide_set_media_lock(drive, tape->disk, 1)) { disk 1591 drivers/ide/ide-tape.c if (!ide_set_media_lock(drive, tape->disk, 0)) disk 1611 drivers/ide/ide-tape.c if (ide_queue_pc_tail(drive, tape->disk, &pc, pc_buf, pc.req_xfer)) { disk 1640 drivers/ide/ide-tape.c if (ide_queue_pc_tail(drive, tape->disk, &pc, buf, pc.req_xfer)) { disk 1812 drivers/ide/ide-tape.c ide_unregister_region(tape->disk); disk 1823 drivers/ide/ide-tape.c struct gendisk *g = tape->disk; disk 1908 drivers/ide/ide-tape.c static void idetape_release(struct gendisk *disk, fmode_t mode) disk 1910 drivers/ide/ide-tape.c struct ide_tape_obj *tape = ide_drv_g(disk, ide_tape_obj); disk 1982 drivers/ide/ide-tape.c tape->disk = g; disk 43 drivers/lightnvm/core.c if (!strcmp(name, tgt->disk->disk_name)) disk 59 drivers/lightnvm/core.c if (!strcmp(name, tgt->disk->disk_name)) { disk 422 drivers/lightnvm/core.c t->disk = tdisk; disk 452 drivers/lightnvm/core.c struct gendisk *tdisk = t->disk; disk 33 drivers/lightnvm/pblk-cache.c &pblk->disk->part0); disk 82 drivers/lightnvm/pblk-cache.c generic_end_io_acct(q, REQ_OP_WRITE, &pblk->disk->part0, start_time); disk 1158 drivers/lightnvm/pblk-init.c pblk->disk = tdisk; disk 195 drivers/lightnvm/pblk-read.c generic_end_io_acct(dev->q, REQ_OP_READ, &pblk->disk->part0, start_time); disk 276 drivers/lightnvm/pblk-read.c &pblk->disk->part0); disk 706 drivers/lightnvm/pblk-sysfs.c struct device *parent_dev = disk_to_dev(pblk->disk); disk 594 drivers/lightnvm/pblk.h struct gendisk *disk; disk 712 drivers/lightnvm/pblk.h pr_err("pblk %s: " fmt, pblk->disk->disk_name, ##__VA_ARGS__) disk 714 drivers/lightnvm/pblk.h pr_info("pblk %s: " fmt, pblk->disk->disk_name, ##__VA_ARGS__) disk 716 drivers/lightnvm/pblk.h pr_warn("pblk %s: " fmt, pblk->disk->disk_name, ##__VA_ARGS__) disk 718 drivers/lightnvm/pblk.h pr_debug("pblk %s: " fmt, pblk->disk->disk_name, ##__VA_ARGS__) disk 1325 drivers/lightnvm/pblk.h struct gendisk *disk = pblk->disk; disk 1327 drivers/lightnvm/pblk.h return disk->disk_name; disk 259 drivers/md/bcache/bcache.h struct gendisk *disk; disk 300 drivers/md/bcache/bcache.h struct bcache_device disk; disk 1787 drivers/md/bcache/btree.c dc = container_of(d, struct cached_dev, disk); disk 139 drivers/md/bcache/debug.c dc->disk.c, disk 377 drivers/md/bcache/request.c struct cache_set *c = dc->disk.c; disk 383 drivers/md/bcache/request.c if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) || disk 619 drivers/md/bcache/request.c dc = container_of(s->d, struct cached_dev, disk); disk 655 drivers/md/bcache/request.c struct cached_dev, disk); disk 683 drivers/md/bcache/request.c generic_end_io_acct(s->d->disk->queue, bio_op(s->orig_bio), disk 684 drivers/md/bcache/request.c &s->d->disk->part0, s->start_time); disk 765 drivers/md/bcache/request.c struct cached_dev *dc = container_of(s->d, struct cached_dev, disk); disk 832 drivers/md/bcache/request.c struct cached_dev *dc = container_of(s->d, struct cached_dev, disk); disk 859 drivers/md/bcache/request.c closure_get(&dc->disk.cl); disk 874 drivers/md/bcache/request.c struct cached_dev *dc = container_of(s->d, struct cached_dev, disk); disk 893 drivers/md/bcache/request.c struct cached_dev *dc = container_of(s->d, struct cached_dev, disk); disk 929 drivers/md/bcache/request.c &dc->disk.bio_split); disk 977 drivers/md/bcache/request.c struct cached_dev *dc = container_of(s->d, struct cached_dev, disk); disk 987 drivers/md/bcache/request.c struct bkey start = KEY(dc->disk.id, bio->bi_iter.bi_sector, 0); disk 988 drivers/md/bcache/request.c struct bkey end = KEY(dc->disk.id, bio_end_sector(bio), 0); disk 1043 drivers/md/bcache/request.c &dc->disk.bio_split); disk 1056 drivers/md/bcache/request.c s->iop.bio = bio_clone_fast(bio, GFP_NOIO, &dc->disk.bio_split); disk 1097 drivers/md/bcache/request.c generic_end_io_acct(ddip->d->disk->queue, bio_op(bio), disk 1098 drivers/md/bcache/request.c &ddip->d->disk->part0, ddip->start_time); disk 1102 drivers/md/bcache/request.c struct cached_dev, disk); disk 1114 drivers/md/bcache/request.c struct cached_dev *dc = container_of(d, struct cached_dev, disk); disk 1161 drivers/md/bcache/request.c dc = container_of(d, struct cached_dev, disk); disk 1181 drivers/md/bcache/request.c struct cached_dev *dc = container_of(d, struct cached_dev, disk); disk 1209 drivers/md/bcache/request.c &d->disk->part0); disk 1244 drivers/md/bcache/request.c struct cached_dev *dc = container_of(d, struct cached_dev, disk); disk 1255 drivers/md/bcache/request.c struct cached_dev *dc = container_of(d, struct cached_dev, disk); disk 1279 drivers/md/bcache/request.c struct gendisk *g = dc->disk.disk; disk 1283 drivers/md/bcache/request.c dc->disk.cache_miss = cached_dev_cache_miss; disk 1284 drivers/md/bcache/request.c dc->disk.ioctl = cached_dev_ioctl; disk 1329 drivers/md/bcache/request.c generic_start_io_acct(q, bio_op(bio), bio_sectors(bio), &d->disk->part0); disk 1388 drivers/md/bcache/request.c struct gendisk *g = d->disk; disk 206 drivers/md/bcache/stats.c struct cached_dev *dc = container_of(d, struct cached_dev, disk); disk 214 drivers/md/bcache/stats.c struct cached_dev *dc = container_of(d, struct cached_dev, disk); disk 222 drivers/md/bcache/stats.c struct cached_dev *dc = container_of(d, struct cached_dev, disk); disk 704 drivers/md/bcache/super.c bd_unlink_disk_holder(ca->bdev, d->disk); disk 716 drivers/md/bcache/super.c bd_link_disk_holder(ca->bdev, d->disk); disk 779 drivers/md/bcache/super.c struct gendisk *disk = d->disk; disk 783 drivers/md/bcache/super.c if (disk) disk 784 drivers/md/bcache/super.c pr_info("%s stopped", disk->disk_name); disk 791 drivers/md/bcache/super.c if (disk) { disk 792 drivers/md/bcache/super.c if (disk->flags & GENHD_FL_UP) disk 793 drivers/md/bcache/super.c del_gendisk(disk); disk 795 drivers/md/bcache/super.c if (disk->queue) disk 796 drivers/md/bcache/super.c blk_cleanup_queue(disk->queue); disk 799 drivers/md/bcache/super.c first_minor_to_idx(disk->first_minor)); disk 800 drivers/md/bcache/super.c put_disk(disk); disk 849 drivers/md/bcache/super.c d->disk = alloc_disk(BCACHE_MINORS); disk 850 drivers/md/bcache/super.c if (!d->disk) disk 853 drivers/md/bcache/super.c set_capacity(d->disk, sectors); disk 854 drivers/md/bcache/super.c snprintf(d->disk->disk_name, DISK_NAME_LEN, "bcache%i", idx); disk 856 drivers/md/bcache/super.c d->disk->major = bcache_major; disk 857 drivers/md/bcache/super.c d->disk->first_minor = idx_to_first_minor(idx); disk 858 drivers/md/bcache/super.c d->disk->fops = &bcache_ops; disk 859 drivers/md/bcache/super.c d->disk->private_data = d; disk 866 drivers/md/bcache/super.c d->disk->queue = q; disk 878 drivers/md/bcache/super.c blk_queue_flag_set(QUEUE_FLAG_NONROT, d->disk->queue); disk 879 drivers/md/bcache/super.c blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, d->disk->queue); disk 880 drivers/md/bcache/super.c blk_queue_flag_set(QUEUE_FLAG_DISCARD, d->disk->queue); disk 928 drivers/md/bcache/super.c "device offline", dc->disk.name); disk 932 drivers/md/bcache/super.c bcache_device_stop(&dc->disk); disk 945 drivers/md/bcache/super.c struct bcache_device *d = &dc->disk; disk 983 drivers/md/bcache/super.c add_disk(d->disk); disk 984 drivers/md/bcache/super.c bd_link_disk_holder(dc->bdev, dc->disk.disk); disk 989 drivers/md/bcache/super.c kobject_uevent_env(&disk_to_dev(d->disk)->kobj, KOBJ_CHANGE, env); disk 994 drivers/md/bcache/super.c if (sysfs_create_link(&d->kobj, &disk_to_dev(d->disk)->kobj, "dev") || disk 995 drivers/md/bcache/super.c sysfs_create_link(&disk_to_dev(d->disk)->kobj, disk 1025 drivers/md/bcache/super.c &dc->disk.flags)) disk 1044 drivers/md/bcache/super.c BUG_ON(!test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags)); disk 1048 drivers/md/bcache/super.c if (test_and_clear_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags)) disk 1064 drivers/md/bcache/super.c calc_cached_dev_sectors(dc->disk.c); disk 1065 drivers/md/bcache/super.c bcache_device_detach(&dc->disk); disk 1068 drivers/md/bcache/super.c clear_bit(BCACHE_DEV_DETACHING, &dc->disk.flags); disk 1069 drivers/md/bcache/super.c clear_bit(BCACHE_DEV_UNLINK_DONE, &dc->disk.flags); disk 1076 drivers/md/bcache/super.c closure_put(&dc->disk.cl); disk 1083 drivers/md/bcache/super.c if (test_bit(BCACHE_DEV_CLOSING, &dc->disk.flags)) disk 1086 drivers/md/bcache/super.c if (test_and_set_bit(BCACHE_DEV_DETACHING, &dc->disk.flags)) disk 1093 drivers/md/bcache/super.c closure_get(&dc->disk.cl); disk 1112 drivers/md/bcache/super.c if (dc->disk.c) { disk 1191 drivers/md/bcache/super.c bcache_device_attach(&dc->disk, c, u - c->uuids); disk 1207 drivers/md/bcache/super.c dc->disk.disk->disk_name); disk 1216 drivers/md/bcache/super.c bch_sectors_dirty_init(&dc->disk); disk 1234 drivers/md/bcache/super.c bcache_device_link(&dc->disk, c, "bdev"); disk 1242 drivers/md/bcache/super.c dc->disk.disk->disk_name, disk 1243 drivers/md/bcache/super.c dc->disk.c->sb.set_uuid); disk 1251 drivers/md/bcache/super.c disk.kobj); disk 1258 drivers/md/bcache/super.c struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl); disk 1260 drivers/md/bcache/super.c if (test_and_clear_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags)) disk 1271 drivers/md/bcache/super.c bd_unlink_disk_holder(dc->bdev, dc->disk.disk); disk 1272 drivers/md/bcache/super.c bcache_device_free(&dc->disk); disk 1285 drivers/md/bcache/super.c kobject_put(&dc->disk.kobj); disk 1290 drivers/md/bcache/super.c struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl); disk 1291 drivers/md/bcache/super.c struct bcache_device *d = &dc->disk; disk 1311 drivers/md/bcache/super.c closure_init(&dc->disk.cl, NULL); disk 1312 drivers/md/bcache/super.c set_closure_fn(&dc->disk.cl, cached_dev_flush, system_wq); disk 1313 drivers/md/bcache/super.c kobject_init(&dc->disk.kobj, &bch_cached_dev_ktype); disk 1318 drivers/md/bcache/super.c bch_cache_accounting_init(&dc->accounting, &dc->disk.cl); disk 1327 drivers/md/bcache/super.c dc->disk.stripe_size = q->limits.io_opt >> 9; disk 1329 drivers/md/bcache/super.c if (dc->disk.stripe_size) disk 1333 drivers/md/bcache/super.c ret = bcache_device_init(&dc->disk, block_size, disk 1338 drivers/md/bcache/super.c dc->disk.disk->queue->backing_dev_info->ra_pages = disk 1339 drivers/md/bcache/super.c max(dc->disk.disk->queue->backing_dev_info->ra_pages, disk 1377 drivers/md/bcache/super.c if (kobject_add(&dc->disk.kobj, &part_to_dev(bdev->bd_part)->kobj, disk 1380 drivers/md/bcache/super.c if (bch_cache_accounting_add_kobjs(&dc->accounting, &dc->disk.kobj)) disk 1401 drivers/md/bcache/super.c bcache_device_stop(&dc->disk); disk 1456 drivers/md/bcache/super.c add_disk(d->disk); disk 1458 drivers/md/bcache/super.c if (kobject_add(&d->kobj, &disk_to_dev(d->disk)->kobj, "bcache")) disk 1513 drivers/md/bcache/super.c if (!dc || test_bit(BCACHE_DEV_CLOSING, &dc->disk.flags)) disk 1521 drivers/md/bcache/super.c dc->disk.disk->disk_name, dc->backing_dev_name); disk 1523 drivers/md/bcache/super.c bcache_device_stop(&dc->disk); disk 1676 drivers/md/bcache/super.c d->disk->disk_name, c->sb.set_uuid); disk 1684 drivers/md/bcache/super.c d->disk->disk_name); disk 1706 drivers/md/bcache/super.c d->disk->disk_name); disk 1726 drivers/md/bcache/super.c dc = container_of(d, struct cached_dev, disk); disk 2528 drivers/md/bcache/super.c bcache_device_stop(&pdev->dc->disk); disk 2589 drivers/md/bcache/super.c bcache_device_stop(&dc->disk); disk 166 drivers/md/bcache/sysfs.c disk.kobj); disk 188 drivers/md/bcache/sysfs.c sysfs_printf(data_csum, "%i", dc->disk.data_csum); disk 221 drivers/md/bcache/sysfs.c bch_hprint(dirty, bcache_dev_sectors_dirty(&dc->disk) << 9); disk 244 drivers/md/bcache/sysfs.c bcache_dev_sectors_dirty(&dc->disk) << 9); disk 246 drivers/md/bcache/sysfs.c sysfs_hprint(stripe_size, ((uint64_t)dc->disk.stripe_size) << 9); disk 283 drivers/md/bcache/sysfs.c disk.kobj); disk 296 drivers/md/bcache/sysfs.c sysfs_strtoul(data_csum, dc->disk.data_csum); disk 393 drivers/md/bcache/sysfs.c if (dc->disk.c) { disk 394 drivers/md/bcache/sysfs.c memcpy(dc->disk.c->uuids[dc->disk.id].label, disk 396 drivers/md/bcache/sysfs.c bch_uuid_write(dc->disk.c); disk 404 drivers/md/bcache/sysfs.c kobject_uevent_env(&disk_to_dev(dc->disk.disk)->kobj, disk 427 drivers/md/bcache/sysfs.c if (attr == &sysfs_detach && dc->disk.c) disk 431 drivers/md/bcache/sysfs.c bcache_device_stop(&dc->disk); disk 439 drivers/md/bcache/sysfs.c disk.kobj); disk 458 drivers/md/bcache/sysfs.c dc->disk.disk->disk_name); disk 473 drivers/md/bcache/sysfs.c if ((dc->disk.c != NULL) && disk 474 drivers/md/bcache/sysfs.c (!test_and_set_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags))) disk 562 drivers/md/bcache/sysfs.c set_capacity(d->disk, u->sectors); disk 32 drivers/md/bcache/writeback.c struct cache_set *c = dc->disk.c; disk 84 drivers/md/bcache/writeback.c int64_t dirty = bcache_dev_sectors_dirty(&dc->disk); disk 174 drivers/md/bcache/writeback.c struct cache_set *c = dc->disk.c; disk 180 drivers/md/bcache/writeback.c set_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); disk 188 drivers/md/bcache/writeback.c if (!test_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags) || disk 190 drivers/md/bcache/writeback.c clear_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); disk 216 drivers/md/bcache/writeback.c if (test_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags) && disk 226 drivers/md/bcache/writeback.c clear_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); disk 234 drivers/md/bcache/writeback.c if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) || disk 291 drivers/md/bcache/writeback.c atomic_inc(&PTR_BUCKET(dc->disk.c, &w->key, i)->pin); disk 293 drivers/md/bcache/writeback.c ret = bch_btree_insert(dc->disk.c, &keys, NULL, &w->key); disk 299 drivers/md/bcache/writeback.c ? &dc->disk.c->writeback_keys_failed disk 300 drivers/md/bcache/writeback.c : &dc->disk.c->writeback_keys_done); disk 362 drivers/md/bcache/writeback.c closure_bio_submit(io->dc->disk.c, &io->bio, cl); disk 377 drivers/md/bcache/writeback.c bch_count_io_errors(PTR_CACHE(io->dc->disk.c, &w->key, 0), disk 388 drivers/md/bcache/writeback.c closure_bio_submit(io->dc->disk.c, &io->bio, cl); disk 415 drivers/md/bcache/writeback.c !test_bit(CACHE_SET_IO_DISABLE, &dc->disk.c->flags) && disk 421 drivers/md/bcache/writeback.c BUG_ON(ptr_stale(dc->disk.c, &next->key, 0)); disk 474 drivers/md/bcache/writeback.c PTR_CACHE(dc->disk.c, &w->key, 0)->bdev); disk 495 drivers/md/bcache/writeback.c !test_bit(CACHE_SET_IO_DISABLE, &dc->disk.c->flags) && disk 562 drivers/md/bcache/writeback.c BUG_ON(KEY_INODE(k) != dc->disk.id); disk 573 drivers/md/bcache/writeback.c stripe = offset_to_stripe(&dc->disk, KEY_OFFSET(&buf->last_scanned)); disk 575 drivers/md/bcache/writeback.c if (stripe >= dc->disk.nr_stripes) disk 581 drivers/md/bcache/writeback.c stripe = find_next_bit(dc->disk.full_dirty_stripes, disk 582 drivers/md/bcache/writeback.c dc->disk.nr_stripes, stripe); disk 584 drivers/md/bcache/writeback.c if (stripe == dc->disk.nr_stripes) disk 587 drivers/md/bcache/writeback.c next_stripe = find_next_zero_bit(dc->disk.full_dirty_stripes, disk 588 drivers/md/bcache/writeback.c dc->disk.nr_stripes, stripe); disk 590 drivers/md/bcache/writeback.c buf->last_scanned = KEY(dc->disk.id, disk 591 drivers/md/bcache/writeback.c stripe * dc->disk.stripe_size, 0); disk 593 drivers/md/bcache/writeback.c bch_refill_keybuf(dc->disk.c, buf, disk 594 drivers/md/bcache/writeback.c &KEY(dc->disk.id, disk 595 drivers/md/bcache/writeback.c next_stripe * dc->disk.stripe_size, 0), disk 606 drivers/md/bcache/writeback.c if (stripe == dc->disk.nr_stripes) { disk 619 drivers/md/bcache/writeback.c struct bkey start = KEY(dc->disk.id, 0, 0); disk 620 drivers/md/bcache/writeback.c struct bkey end = KEY(dc->disk.id, MAX_KEY_OFFSET, 0); disk 639 drivers/md/bcache/writeback.c bch_refill_keybuf(dc->disk.c, buf, &end, dirty_pred); disk 649 drivers/md/bcache/writeback.c bch_refill_keybuf(dc->disk.c, buf, &start_pos, dirty_pred); disk 657 drivers/md/bcache/writeback.c struct cache_set *c = dc->disk.c; disk 673 drivers/md/bcache/writeback.c if (!test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) && disk 701 drivers/md/bcache/writeback.c if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags)) { disk 734 drivers/md/bcache/writeback.c !test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags)) disk 824 drivers/md/bcache/writeback.c WARN_ON(test_and_clear_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags)); disk 845 drivers/md/bcache/writeback.c WARN_ON(test_and_set_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags)); disk 47 drivers/md/bcache/writeback.h unsigned int stripe = offset_to_stripe(&dc->disk, offset); disk 50 drivers/md/bcache/writeback.h if (atomic_read(dc->disk.stripe_sectors_dirty + stripe)) disk 53 drivers/md/bcache/writeback.h if (nr_sectors <= dc->disk.stripe_size) disk 56 drivers/md/bcache/writeback.h nr_sectors -= dc->disk.stripe_size; disk 67 drivers/md/bcache/writeback.h unsigned int in_use = dc->disk.c->gc_stats.in_use; disk 70 drivers/md/bcache/writeback.h test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) || disk 60 drivers/md/dm-core.h struct gendisk *disk; disk 195 drivers/md/dm-era-target.c struct superblock_disk *disk = dm_block_data(b); disk 197 drivers/md/dm-era-target.c disk->blocknr = cpu_to_le64(dm_block_location(b)); disk 198 drivers/md/dm-era-target.c disk->csum = cpu_to_le32(dm_bm_checksum(&disk->flags, disk 203 drivers/md/dm-era-target.c static int check_metadata_version(struct superblock_disk *disk) disk 205 drivers/md/dm-era-target.c uint32_t metadata_version = le32_to_cpu(disk->version); disk 219 drivers/md/dm-era-target.c struct superblock_disk *disk = dm_block_data(b); disk 222 drivers/md/dm-era-target.c if (dm_block_location(b) != le64_to_cpu(disk->blocknr)) { disk 224 drivers/md/dm-era-target.c le64_to_cpu(disk->blocknr), disk 229 drivers/md/dm-era-target.c if (le64_to_cpu(disk->magic) != SUPERBLOCK_MAGIC) { disk 231 drivers/md/dm-era-target.c le64_to_cpu(disk->magic), disk 236 drivers/md/dm-era-target.c csum_le = cpu_to_le32(dm_bm_checksum(&disk->flags, disk 239 drivers/md/dm-era-target.c if (csum_le != disk->csum) { disk 241 drivers/md/dm-era-target.c le32_to_cpu(csum_le), le32_to_cpu(disk->csum)); disk 245 drivers/md/dm-era-target.c return check_metadata_version(disk); disk 353 drivers/md/dm-era-target.c static void ws_pack(const struct writeset_metadata *core, struct writeset_disk *disk) disk 355 drivers/md/dm-era-target.c disk->nr_bits = cpu_to_le32(core->nr_bits); disk 356 drivers/md/dm-era-target.c disk->root = cpu_to_le64(core->root); disk 359 drivers/md/dm-era-target.c static void ws_unpack(const struct writeset_disk *disk, struct writeset_metadata *core) disk 361 drivers/md/dm-era-target.c core->nr_bits = le32_to_cpu(disk->nr_bits); disk 362 drivers/md/dm-era-target.c core->root = le64_to_cpu(disk->root); disk 477 drivers/md/dm-era-target.c static void copy_sm_root(struct era_metadata *md, struct superblock_disk *disk) disk 479 drivers/md/dm-era-target.c memcpy(&disk->metadata_space_map_root, disk 489 drivers/md/dm-era-target.c static void prepare_superblock(struct era_metadata *md, struct superblock_disk *disk) disk 491 drivers/md/dm-era-target.c disk->magic = cpu_to_le64(SUPERBLOCK_MAGIC); disk 492 drivers/md/dm-era-target.c disk->flags = cpu_to_le32(0ul); disk 495 drivers/md/dm-era-target.c memset(disk->uuid, 0, sizeof(disk->uuid)); disk 496 drivers/md/dm-era-target.c disk->version = cpu_to_le32(MAX_ERA_VERSION); disk 498 drivers/md/dm-era-target.c copy_sm_root(md, disk); disk 500 drivers/md/dm-era-target.c disk->data_block_size = cpu_to_le32(md->block_size); disk 501 drivers/md/dm-era-target.c disk->metadata_block_size = cpu_to_le32(DM_ERA_METADATA_BLOCK_SIZE >> SECTOR_SHIFT); disk 502 drivers/md/dm-era-target.c disk->nr_blocks = cpu_to_le32(md->nr_blocks); disk 503 drivers/md/dm-era-target.c disk->current_era = cpu_to_le32(md->current_era); disk 505 drivers/md/dm-era-target.c ws_pack(&md->current_writeset->md, &disk->current_writeset); disk 506 drivers/md/dm-era-target.c disk->writeset_tree_root = cpu_to_le64(md->writeset_tree_root); disk 507 drivers/md/dm-era-target.c disk->era_array_root = cpu_to_le64(md->era_array_root); disk 508 drivers/md/dm-era-target.c disk->metadata_snap = cpu_to_le64(md->metadata_snap); disk 515 drivers/md/dm-era-target.c struct superblock_disk *disk; disk 527 drivers/md/dm-era-target.c disk = dm_block_data(sblock); disk 528 drivers/md/dm-era-target.c prepare_superblock(md, disk); disk 558 drivers/md/dm-era-target.c struct superblock_disk *disk; disk 566 drivers/md/dm-era-target.c disk = dm_block_data(sblock); disk 568 drivers/md/dm-era-target.c disk->metadata_space_map_root, disk 569 drivers/md/dm-era-target.c sizeof(disk->metadata_space_map_root), disk 578 drivers/md/dm-era-target.c md->block_size = le32_to_cpu(disk->data_block_size); disk 579 drivers/md/dm-era-target.c md->nr_blocks = le32_to_cpu(disk->nr_blocks); disk 580 drivers/md/dm-era-target.c md->current_era = le32_to_cpu(disk->current_era); disk 582 drivers/md/dm-era-target.c md->writeset_tree_root = le64_to_cpu(disk->writeset_tree_root); disk 583 drivers/md/dm-era-target.c md->era_array_root = le64_to_cpu(disk->era_array_root); disk 584 drivers/md/dm-era-target.c md->metadata_snap = le64_to_cpu(disk->metadata_snap); disk 725 drivers/md/dm-era-target.c struct writeset_disk disk; disk 735 drivers/md/dm-era-target.c md->writeset_tree_root, &key, &disk); disk 746 drivers/md/dm-era-target.c ws_unpack(&disk, &d->writeset); disk 1062 drivers/md/dm-era-target.c struct superblock_disk *disk; disk 1081 drivers/md/dm-era-target.c disk = dm_block_data(clone); disk 1083 drivers/md/dm-era-target.c le64_to_cpu(disk->writeset_tree_root)); disk 1090 drivers/md/dm-era-target.c r = dm_array_del(&md->era_array_info, le64_to_cpu(disk->era_array_root)); disk 3132 drivers/md/dm-integrity.c struct gendisk *disk = dm_disk(dm_table_get_md(ti->table)); disk 3141 drivers/md/dm-integrity.c blk_integrity_register(disk, &bi); disk 3142 drivers/md/dm-integrity.c blk_queue_max_integrity_segments(disk->queue, UINT_MAX); disk 511 drivers/md/dm-ioctl.c struct gendisk *disk; disk 548 drivers/md/dm-ioctl.c disk = dm_disk(hc->md); disk 549 drivers/md/dm-ioctl.c nl->dev = huge_encode_dev(disk_devt(disk)); disk 719 drivers/md/dm-ioctl.c struct gendisk *disk = dm_disk(md); disk 735 drivers/md/dm-ioctl.c param->dev = huge_encode_dev(disk_devt(disk)); disk 750 drivers/md/dm-ioctl.c if (get_disk_ro(disk)) disk 2139 drivers/md/dm-ioctl.c DMINFO("%s (%s) is ready", md->disk->disk_name, dmi->name); disk 280 drivers/md/dm-log.c static void header_to_disk(struct log_header_core *core, struct log_header_disk *disk) disk 282 drivers/md/dm-log.c disk->magic = cpu_to_le32(core->magic); disk 283 drivers/md/dm-log.c disk->version = cpu_to_le32(core->version); disk 284 drivers/md/dm-log.c disk->nr_regions = cpu_to_le64(core->nr_regions); disk 287 drivers/md/dm-log.c static void header_from_disk(struct log_header_core *core, struct log_header_disk *disk) disk 289 drivers/md/dm-log.c core->magic = le32_to_cpu(disk->magic); disk 290 drivers/md/dm-log.c core->version = le32_to_cpu(disk->version); disk 291 drivers/md/dm-log.c core->nr_regions = le64_to_cpu(disk->nr_regions); disk 1191 drivers/md/dm-table.c static bool integrity_profile_exists(struct gendisk *disk) disk 1193 drivers/md/dm-table.c return !!blk_get_integrity(disk); disk 1973 drivers/md/dm-table.c blk_revalidate_disk_zones(t->md->disk); disk 513 drivers/md/dm-thin-metadata.c struct thin_disk_superblock *disk) disk 515 drivers/md/dm-thin-metadata.c memcpy(&disk->metadata_space_map_root, disk 519 drivers/md/dm-thin-metadata.c memcpy(&disk->data_space_map_root, disk 598 drivers/md/dm-zoned-target.c struct gendisk *disk; disk 605 drivers/md/dm-zoned-target.c disk = dmz_dev->bdev->bd_disk; disk 606 drivers/md/dm-zoned-target.c if (disk->fops->check_events && disk 607 drivers/md/dm-zoned-target.c disk->fops->check_events(disk, 0) & DISK_EVENT_MEDIA_CHANGE) { disk 353 drivers/md/dm.c static void dm_blk_close(struct gendisk *disk, fmode_t mode) disk 359 drivers/md/dm.c md = disk->private_data; disk 423 drivers/md/dm.c return get_capacity(md->disk); disk 443 drivers/md/dm.c static int dm_blk_report_zones(struct gendisk *disk, sector_t sector, disk 447 drivers/md/dm.c struct mapped_device *md = disk->private_data; disk 1893 drivers/md/dm.c if (md->disk) { disk 1895 drivers/md/dm.c md->disk->private_data = NULL; disk 1897 drivers/md/dm.c del_gendisk(md->disk); disk 1898 drivers/md/dm.c put_disk(md->disk); disk 1974 drivers/md/dm.c md->disk = alloc_disk_node(1, md->numa_node_id); disk 1975 drivers/md/dm.c if (!md->disk) disk 1983 drivers/md/dm.c md->disk->major = _major; disk 1984 drivers/md/dm.c md->disk->first_minor = minor; disk 1985 drivers/md/dm.c md->disk->fops = &dm_blk_dops; disk 1986 drivers/md/dm.c md->disk->queue = md->queue; disk 1987 drivers/md/dm.c md->disk->private_data = md; disk 1988 drivers/md/dm.c sprintf(md->disk->disk_name, "dm-%d", minor); disk 1991 drivers/md/dm.c md->dax_dev = alloc_dax(md, md->disk->disk_name, disk 1997 drivers/md/dm.c add_disk_no_queue_reg(md->disk); disk 2004 drivers/md/dm.c md->bdev = bdget_disk(md->disk, 0); disk 2034 drivers/md/dm.c int minor = MINOR(disk_devt(md->disk)); disk 2103 drivers/md/dm.c dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj); disk 2117 drivers/md/dm.c set_capacity(md->disk, size); disk 2306 drivers/md/dm.c blk_register_queue(md->disk); disk 2893 drivers/md/dm.c return kobject_uevent(&disk_to_dev(md->disk)->kobj, action); disk 2897 drivers/md/dm.c return kobject_uevent_env(&disk_to_dev(md->disk)->kobj, disk 2933 drivers/md/dm.c return md->disk; disk 101 drivers/md/md-linear.c struct dev_info *disk = conf->disks + j; disk 104 drivers/md/md-linear.c if (j < 0 || j >= raid_disks || disk->rdev) { disk 110 drivers/md/md-linear.c disk->rdev = rdev; disk 369 drivers/md/md-multipath.c struct multipath_info *disk; disk 406 drivers/md/md-multipath.c disk = conf->multipaths + disk_idx; disk 407 drivers/md/md-multipath.c disk->rdev = rdev; disk 5437 drivers/md/md.c struct gendisk *disk; disk 5489 drivers/md/md.c disk = alloc_disk(1 << shift); disk 5490 drivers/md/md.c if (!disk) { disk 5495 drivers/md/md.c disk->major = MAJOR(mddev->unit); disk 5496 drivers/md/md.c disk->first_minor = unit << shift; disk 5498 drivers/md/md.c strcpy(disk->disk_name, name); disk 5500 drivers/md/md.c sprintf(disk->disk_name, "md_d%d", unit); disk 5502 drivers/md/md.c sprintf(disk->disk_name, "md%d", unit); disk 5503 drivers/md/md.c disk->fops = &md_fops; disk 5504 drivers/md/md.c disk->private_data = mddev; disk 5505 drivers/md/md.c disk->queue = mddev->queue; disk 5511 drivers/md/md.c disk->flags |= GENHD_FL_EXT_DEVT; disk 5512 drivers/md/md.c mddev->gendisk = disk; disk 5517 drivers/md/md.c add_disk(disk); disk 5519 drivers/md/md.c error = kobject_add(&mddev->kobj, &disk_to_dev(disk)->kobj, "%s", "md"); disk 5525 drivers/md/md.c disk->disk_name); disk 5914 drivers/md/md.c struct gendisk *disk = mddev->gendisk; disk 5944 drivers/md/md.c set_disk_ro(disk, 0); disk 6147 drivers/md/md.c struct gendisk *disk = mddev->gendisk; disk 6185 drivers/md/md.c set_disk_ro(disk, 0); disk 6198 drivers/md/md.c set_capacity(disk, 0); disk 6201 drivers/md/md.c revalidate_disk(disk); disk 7636 drivers/md/md.c static void md_release(struct gendisk *disk, fmode_t mode) disk 7638 drivers/md/md.c struct mddev *mddev = disk->private_data; disk 7645 drivers/md/md.c static int md_media_changed(struct gendisk *disk) disk 7647 drivers/md/md.c struct mddev *mddev = disk->private_data; disk 7652 drivers/md/md.c static int md_revalidate(struct gendisk *disk) disk 7654 drivers/md/md.c struct mddev *mddev = disk->private_data; disk 8226 drivers/md/md.c struct gendisk *disk = rdev->bdev->bd_contains->bd_disk; disk 8227 drivers/md/md.c curr_events = (int)part_stat_read_accum(&disk->part0, sectors) - disk 8228 drivers/md/md.c atomic_read(&disk->sync_io); disk 489 drivers/md/raid0.c unsigned int disk; disk 526 drivers/md/raid0.c for (disk = 0; disk < zone->nb_dev; disk++) { disk 531 drivers/md/raid0.c if (disk < start_disk_index) disk 534 drivers/md/raid0.c else if (disk > start_disk_index) disk 539 drivers/md/raid0.c if (disk < end_disk_index) disk 541 drivers/md/raid0.c else if (disk > end_disk_index) disk 550 drivers/md/raid0.c conf->strip_zone[0].nb_dev + disk]; disk 314 drivers/md/raid1.c static inline void update_head_pos(int disk, struct r1bio *r1_bio) disk 318 drivers/md/raid1.c conf->mirrors[disk].head_position = disk 584 drivers/md/raid1.c int disk; disk 617 drivers/md/raid1.c for (disk = 0 ; disk < conf->raid_disks * 2 ; disk++) { disk 624 drivers/md/raid1.c rdev = rcu_dereference(conf->mirrors[disk].rdev); disk 625 drivers/md/raid1.c if (r1_bio->bios[disk] == IO_BLOCKED disk 644 drivers/md/raid1.c best_dist_disk = disk; disk 645 drivers/md/raid1.c best_pending_disk = disk; disk 672 drivers/md/raid1.c best_disk = disk; disk 691 drivers/md/raid1.c dist = abs(this_sector - conf->mirrors[disk].head_position); disk 693 drivers/md/raid1.c best_disk = disk; disk 697 drivers/md/raid1.c if (conf->mirrors[disk].next_seq_sect == this_sector disk 700 drivers/md/raid1.c struct raid1_info *mirror = &conf->mirrors[disk]; disk 702 drivers/md/raid1.c best_disk = disk; disk 732 drivers/md/raid1.c best_pending_disk = disk; disk 737 drivers/md/raid1.c best_dist_disk = disk; disk 2638 drivers/md/raid1.c int disk = -1; disk 2764 drivers/md/raid1.c if (disk < 0) disk 2765 drivers/md/raid1.c disk = i; disk 2793 drivers/md/raid1.c if (disk < 0) disk 2794 drivers/md/raid1.c disk = wonly; disk 2795 drivers/md/raid1.c r1_bio->read_disk = disk; disk 2942 drivers/md/raid1.c struct raid1_info *disk; disk 3003 drivers/md/raid1.c disk = conf->mirrors + mddev->raid_disks + disk_idx; disk 3005 drivers/md/raid1.c disk = conf->mirrors + disk_idx; disk 3007 drivers/md/raid1.c if (disk->rdev) disk 3009 drivers/md/raid1.c disk->rdev = rdev; disk 3010 drivers/md/raid1.c disk->head_position = 0; disk 3011 drivers/md/raid1.c disk->seq_start = MaxSector; disk 3028 drivers/md/raid1.c disk = conf->mirrors + i; disk 3031 drivers/md/raid1.c disk[conf->raid_disks].rdev) { disk 3033 drivers/md/raid1.c if (!disk->rdev) { disk 3037 drivers/md/raid1.c disk->rdev = disk 3038 drivers/md/raid1.c disk[conf->raid_disks].rdev; disk 3039 drivers/md/raid1.c disk[conf->raid_disks].rdev = NULL; disk 3040 drivers/md/raid1.c } else if (!test_bit(In_sync, &disk->rdev->flags)) disk 3045 drivers/md/raid1.c if (!disk->rdev || disk 3046 drivers/md/raid1.c !test_bit(In_sync, &disk->rdev->flags)) { disk 3047 drivers/md/raid1.c disk->head_position = 0; disk 3048 drivers/md/raid1.c if (disk->rdev && disk 3049 drivers/md/raid1.c (disk->rdev->saved_raid_disk < 0)) disk 708 drivers/md/raid10.c int disk, slot; disk 751 drivers/md/raid10.c disk = r10_bio->devs[slot].devnum; disk 752 drivers/md/raid10.c rdev = rcu_dereference(conf->mirrors[disk].replacement); disk 755 drivers/md/raid10.c rdev = rcu_dereference(conf->mirrors[disk].rdev); disk 822 drivers/md/raid10.c conf->mirrors[disk].head_position); disk 1156 drivers/md/raid10.c int disk; disk 1164 drivers/md/raid10.c disk = r10_bio->devs[slot].devnum; disk 1165 drivers/md/raid10.c err_rdev = rcu_dereference(conf->mirrors[disk].rdev); disk 3727 drivers/md/raid10.c struct raid10_info *disk; disk 3785 drivers/md/raid10.c disk = conf->mirrors + disk_idx; disk 3788 drivers/md/raid10.c if (disk->replacement) disk 3790 drivers/md/raid10.c disk->replacement = rdev; disk 3792 drivers/md/raid10.c if (disk->rdev) disk 3794 drivers/md/raid10.c disk->rdev = rdev; disk 3808 drivers/md/raid10.c disk->head_position = 0; disk 3846 drivers/md/raid10.c disk = conf->mirrors + i; disk 3848 drivers/md/raid10.c if (!disk->rdev && disk->replacement) { disk 3850 drivers/md/raid10.c disk->rdev = disk->replacement; disk 3851 drivers/md/raid10.c disk->replacement = NULL; disk 3852 drivers/md/raid10.c clear_bit(Replacement, &disk->rdev->flags); disk 3855 drivers/md/raid10.c if (!disk->rdev || disk 3856 drivers/md/raid10.c !test_bit(In_sync, &disk->rdev->flags)) { disk 3857 drivers/md/raid10.c disk->head_position = 0; disk 3859 drivers/md/raid10.c if (disk->rdev && disk 3860 drivers/md/raid10.c disk->rdev->saved_raid_disk < 0) disk 3864 drivers/md/raid10.c if (disk->replacement && disk 3865 drivers/md/raid10.c !test_bit(In_sync, &disk->replacement->flags) && disk 3866 drivers/md/raid10.c disk->replacement->saved_raid_disk < 0) { disk 3870 drivers/md/raid10.c disk->recovery_disabled = mddev->recovery_disabled - 1; disk 857 drivers/md/raid5-ppl.c int disk; disk 866 drivers/md/raid5-ppl.c for (disk = 0; disk < data_disks; disk++) { disk 871 drivers/md/raid5-ppl.c (disk * conf->chunk_sectors); disk 874 drivers/md/raid5-ppl.c __func__, indent, "", disk); disk 944 drivers/md/raid5-ppl.c 0, &disk, &sh); disk 123 drivers/md/raid5.c static inline int raid6_next_disk(int disk, int raid_disks) disk 125 drivers/md/raid5.c disk++; disk 126 drivers/md/raid5.c return (disk < raid_disks) ? disk : 0; disk 6882 drivers/md/raid5.c struct disk_info *disk; disk 7028 drivers/md/raid5.c disk = conf->disks + raid_disk; disk 7031 drivers/md/raid5.c if (disk->replacement) disk 7033 drivers/md/raid5.c disk->replacement = rdev; disk 7035 drivers/md/raid5.c if (disk->rdev) disk 7037 drivers/md/raid5.c disk->rdev = rdev; disk 7684 drivers/md/raid5.c int disk; disk 7727 drivers/md/raid5.c for (disk = first; disk <= last; disk++) { disk 7728 drivers/md/raid5.c p = conf->disks + disk; disk 7731 drivers/md/raid5.c rdev->raid_disk = disk; disk 7732 drivers/md/raid5.c if (rdev->saved_raid_disk != disk) disk 7741 drivers/md/raid5.c for (disk = first; disk <= last; disk++) { disk 7742 drivers/md/raid5.c p = conf->disks + disk; disk 7747 drivers/md/raid5.c rdev->raid_disk = disk; disk 1939 drivers/memstick/core/ms_block.c struct gendisk *disk = bdev->bd_disk; disk 1940 drivers/memstick/core/ms_block.c struct msb_data *msb = disk->private_data; disk 1962 drivers/memstick/core/ms_block.c static int msb_disk_release(struct gendisk *disk) disk 1964 drivers/memstick/core/ms_block.c struct msb_data *msb = disk->private_data; disk 1974 drivers/memstick/core/ms_block.c disk->private_data = NULL; disk 1976 drivers/memstick/core/ms_block.c put_disk(disk); disk 1984 drivers/memstick/core/ms_block.c static void msb_bd_release(struct gendisk *disk, fmode_t mode) disk 1986 drivers/memstick/core/ms_block.c msb_disk_release(disk); disk 2113 drivers/memstick/core/ms_block.c msb->disk = alloc_disk(0); disk 2114 drivers/memstick/core/ms_block.c if (!msb->disk) { disk 2135 drivers/memstick/core/ms_block.c sprintf(msb->disk->disk_name, "msblk%d", msb->disk_id); disk 2136 drivers/memstick/core/ms_block.c msb->disk->fops = &msb_bdops; disk 2137 drivers/memstick/core/ms_block.c msb->disk->private_data = msb; disk 2138 drivers/memstick/core/ms_block.c msb->disk->queue = msb->queue; disk 2139 drivers/memstick/core/ms_block.c msb->disk->flags |= GENHD_FL_EXT_DEVT; disk 2143 drivers/memstick/core/ms_block.c set_capacity(msb->disk, capacity); disk 2152 drivers/memstick/core/ms_block.c set_disk_ro(msb->disk, 1); disk 2155 drivers/memstick/core/ms_block.c device_add_disk(&card->dev, msb->disk, NULL); disk 2160 drivers/memstick/core/ms_block.c put_disk(msb->disk); disk 2215 drivers/memstick/core/ms_block.c del_gendisk(msb->disk); disk 2224 drivers/memstick/core/ms_block.c msb_disk_release(msb->disk); disk 148 drivers/memstick/core/ms_block.h struct gendisk *disk; disk 138 drivers/memstick/core/mspro_block.c struct gendisk *disk; disk 183 drivers/memstick/core/mspro_block.c struct gendisk *disk = bdev->bd_disk; disk 184 drivers/memstick/core/mspro_block.c struct mspro_block_data *msb = disk->private_data; disk 203 drivers/memstick/core/mspro_block.c static void mspro_block_disk_release(struct gendisk *disk) disk 205 drivers/memstick/core/mspro_block.c struct mspro_block_data *msb = disk->private_data; disk 206 drivers/memstick/core/mspro_block.c int disk_id = MINOR(disk_devt(disk)) >> MSPRO_BLOCK_PART_SHIFT; disk 216 drivers/memstick/core/mspro_block.c disk->private_data = NULL; disk 218 drivers/memstick/core/mspro_block.c put_disk(disk); disk 225 drivers/memstick/core/mspro_block.c static void mspro_block_bd_release(struct gendisk *disk, fmode_t mode) disk 227 drivers/memstick/core/mspro_block.c mspro_block_disk_release(disk); disk 1208 drivers/memstick/core/mspro_block.c msb->disk = alloc_disk(1 << MSPRO_BLOCK_PART_SHIFT); disk 1209 drivers/memstick/core/mspro_block.c if (!msb->disk) { disk 1229 drivers/memstick/core/mspro_block.c msb->disk->major = major; disk 1230 drivers/memstick/core/mspro_block.c msb->disk->first_minor = disk_id << MSPRO_BLOCK_PART_SHIFT; disk 1231 drivers/memstick/core/mspro_block.c msb->disk->fops = &ms_block_bdops; disk 1233 drivers/memstick/core/mspro_block.c msb->disk->private_data = msb; disk 1234 drivers/memstick/core/mspro_block.c msb->disk->queue = msb->queue; disk 1236 drivers/memstick/core/mspro_block.c sprintf(msb->disk->disk_name, "mspblk%d", disk_id); disk 1243 drivers/memstick/core/mspro_block.c set_capacity(msb->disk, capacity); disk 1246 drivers/memstick/core/mspro_block.c device_add_disk(&card->dev, msb->disk, NULL); disk 1251 drivers/memstick/core/mspro_block.c put_disk(msb->disk); disk 1331 drivers/memstick/core/mspro_block.c del_gendisk(msb->disk); disk 1344 drivers/memstick/core/mspro_block.c mspro_block_disk_release(msb->disk); disk 5158 drivers/message/fusion/mptbase.c int disk; disk 5165 drivers/message/fusion/mptbase.c disk = pRaidEventData->PhysDiskNum; disk 5178 drivers/message/fusion/mptbase.c ioc->name, disk, volume); disk 5221 drivers/message/fusion/mptbase.c ioc->name, disk); disk 5267 drivers/message/fusion/mptbase.c ioc->name, disk); disk 5277 drivers/message/fusion/mptbase.c ioc->name, disk); disk 1107 drivers/message/fusion/mptspi.c int disk; disk 1118 drivers/message/fusion/mptspi.c int disk = wqw->disk; disk 1138 drivers/message/fusion/mptspi.c if(vtarget->id != disk) disk 1146 drivers/message/fusion/mptspi.c "Integrated RAID detects new device %d\n", ioc->name, disk); disk 1147 drivers/message/fusion/mptspi.c scsi_scan_target(&ioc->sh->shost_gendev, 1, disk, 0, SCSI_SCAN_RESCAN); disk 1151 drivers/message/fusion/mptspi.c static void mpt_dv_raid(struct _MPT_SCSI_HOST *hd, int disk) disk 1159 drivers/message/fusion/mptspi.c ioc->name, disk); disk 1164 drivers/message/fusion/mptspi.c wqw->disk = disk; disk 1183 drivers/message/fusion/mptspi.c int disk = (le32_to_cpu(pEvReply->Data[0]) & 0xFF000000) >> 24; disk 1184 drivers/message/fusion/mptspi.c mpt_dv_raid(hd, disk); disk 104 drivers/mmc/core/block.c struct gendisk *disk; disk 172 drivers/mmc/core/block.c static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk) disk 177 drivers/mmc/core/block.c md = disk->private_data; disk 187 drivers/mmc/core/block.c static inline int mmc_get_devidx(struct gendisk *disk) disk 189 drivers/mmc/core/block.c int devidx = disk->first_minor / perdev_minors; disk 198 drivers/mmc/core/block.c int devidx = mmc_get_devidx(md->disk); disk 201 drivers/mmc/core/block.c put_disk(md->disk); disk 258 drivers/mmc/core/block.c md->disk->disk_name); disk 259 drivers/mmc/core/block.c set_disk_ro(md->disk, 1); disk 263 drivers/mmc/core/block.c pr_info("%s: Locking boot partition ro until next power on\n", part_md->disk->disk_name); disk 264 drivers/mmc/core/block.c set_disk_ro(part_md->disk, 1); disk 325 drivers/mmc/core/block.c static void mmc_blk_release(struct gendisk *disk, fmode_t mode) disk 327 drivers/mmc/core/block.c struct mmc_blk_data *md = disk->private_data; disk 1062 drivers/mmc/core/block.c md->disk->disk_name, ret); disk 1078 drivers/mmc/core/block.c md->disk->disk_name); disk 1341 drivers/mmc/core/block.c get_capacity(md->disk))) disk 2286 drivers/mmc/core/block.c md->disk = alloc_disk(perdev_minors); disk 2287 drivers/mmc/core/block.c if (md->disk == NULL) { disk 2314 drivers/mmc/core/block.c md->disk->major = MMC_BLOCK_MAJOR; disk 2315 drivers/mmc/core/block.c md->disk->first_minor = devidx * perdev_minors; disk 2316 drivers/mmc/core/block.c md->disk->fops = &mmc_bdops; disk 2317 drivers/mmc/core/block.c md->disk->private_data = md; disk 2318 drivers/mmc/core/block.c md->disk->queue = md->queue.queue; disk 2320 drivers/mmc/core/block.c set_disk_ro(md->disk, md->read_only || default_ro); disk 2321 drivers/mmc/core/block.c md->disk->flags = GENHD_FL_EXT_DEVT; disk 2323 drivers/mmc/core/block.c md->disk->flags |= GENHD_FL_NO_PART_SCAN disk 2338 drivers/mmc/core/block.c snprintf(md->disk->disk_name, sizeof(md->disk->disk_name), disk 2341 drivers/mmc/core/block.c set_capacity(md->disk, size); disk 2362 drivers/mmc/core/block.c put_disk(md->disk); disk 2404 drivers/mmc/core/block.c part_md = mmc_blk_alloc_req(card, disk_to_dev(md->disk), size, default_ro, disk 2411 drivers/mmc/core/block.c string_get_size((u64)get_capacity(part_md->disk), 512, STRING_UNITS_2, disk 2414 drivers/mmc/core/block.c part_md->disk->disk_name, mmc_card_id(card), disk 2468 drivers/mmc/core/block.c mmc_blk_get(rpmb->md->disk); disk 2624 drivers/mmc/core/block.c if (md->disk->flags & GENHD_FL_UP) { disk 2625 drivers/mmc/core/block.c device_remove_file(disk_to_dev(md->disk), &md->force_ro); disk 2628 drivers/mmc/core/block.c device_remove_file(disk_to_dev(md->disk), disk 2631 drivers/mmc/core/block.c del_gendisk(md->disk); disk 2664 drivers/mmc/core/block.c device_add_disk(md->parent, md->disk, NULL); disk 2670 drivers/mmc/core/block.c ret = device_create_file(disk_to_dev(md->disk), &md->force_ro); disk 2689 drivers/mmc/core/block.c ret = device_create_file(disk_to_dev(md->disk), disk 2697 drivers/mmc/core/block.c device_remove_file(disk_to_dev(md->disk), &md->force_ro); disk 2699 drivers/mmc/core/block.c del_gendisk(md->disk); disk 2891 drivers/mmc/core/block.c string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, disk 2894 drivers/mmc/core/block.c md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), disk 33 drivers/mtd/mtd_blkdevs.c dev->disk->private_data = NULL; disk 37 drivers/mtd/mtd_blkdevs.c put_disk(dev->disk); disk 42 drivers/mtd/mtd_blkdevs.c static struct mtd_blktrans_dev *blktrans_dev_get(struct gendisk *disk) disk 47 drivers/mtd/mtd_blkdevs.c dev = disk->private_data; disk 254 drivers/mtd/mtd_blkdevs.c static void blktrans_release(struct gendisk *disk, fmode_t mode) disk 256 drivers/mtd/mtd_blkdevs.c struct mtd_blktrans_dev *dev = blktrans_dev_get(disk); disk 404 drivers/mtd/mtd_blkdevs.c new->disk = gd; disk 471 drivers/mtd/mtd_blkdevs.c put_disk(new->disk); disk 488 drivers/mtd/mtd_blkdevs.c sysfs_remove_group(&disk_to_dev(old->disk)->kobj, disk 492 drivers/mtd/mtd_blkdevs.c del_gendisk(old->disk); disk 1451 drivers/mtd/mtdswap.c d->dev = disk_to_dev(mbd_dev->disk); disk 235 drivers/nvdimm/blk.c static void nd_blk_release_disk(void *disk) disk 237 drivers/nvdimm/blk.c del_gendisk(disk); disk 238 drivers/nvdimm/blk.c put_disk(disk); disk 246 drivers/nvdimm/blk.c struct gendisk *disk; disk 264 drivers/nvdimm/blk.c disk = alloc_disk(0); disk 265 drivers/nvdimm/blk.c if (!disk) disk 268 drivers/nvdimm/blk.c disk->first_minor = 0; disk 269 drivers/nvdimm/blk.c disk->fops = &nd_blk_fops; disk 270 drivers/nvdimm/blk.c disk->queue = q; disk 271 drivers/nvdimm/blk.c disk->flags = GENHD_FL_EXT_DEVT; disk 272 drivers/nvdimm/blk.c nvdimm_namespace_disk_name(&nsblk->common, disk->disk_name); disk 274 drivers/nvdimm/blk.c if (devm_add_action_or_reset(dev, nd_blk_release_disk, disk)) disk 278 drivers/nvdimm/blk.c int rc = nd_integrity_init(disk, nsblk_meta_size(nsblk)); disk 284 drivers/nvdimm/blk.c set_capacity(disk, available_disk_size >> SECTOR_SHIFT); disk 285 drivers/nvdimm/blk.c device_add_disk(dev, disk, NULL); disk 286 drivers/nvdimm/blk.c revalidate_disk(disk); disk 626 drivers/nvdimm/bus.c int nvdimm_revalidate_disk(struct gendisk *disk) disk 628 drivers/nvdimm/bus.c struct device *dev = disk_to_dev(disk)->parent; disk 630 drivers/nvdimm/bus.c int disk_ro = get_disk_ro(disk); disk 640 drivers/nvdimm/bus.c dev_name(&nd_region->dev), disk->disk_name); disk 641 drivers/nvdimm/bus.c set_disk_ro(disk, 1); disk 400 drivers/nvdimm/core.c int nd_integrity_init(struct gendisk *disk, unsigned long meta_size) disk 412 drivers/nvdimm/core.c blk_integrity_register(disk, &bi); disk 413 drivers/nvdimm/core.c blk_queue_max_integrity_segments(disk->queue, 1); disk 420 drivers/nvdimm/core.c int nd_integrity_init(struct gendisk *disk, unsigned long meta_size) disk 220 drivers/nvdimm/nd.h int nd_integrity_init(struct gendisk *disk, unsigned long meta_size); disk 355 drivers/nvdimm/nd.h int nvdimm_revalidate_disk(struct gendisk *disk); disk 402 drivers/nvdimm/nd.h struct gendisk *disk = bio->bi_disk; disk 404 drivers/nvdimm/nd.h if (!blk_queue_io_stat(disk->queue)) disk 408 drivers/nvdimm/nd.h generic_start_io_acct(disk->queue, bio_op(bio), bio_sectors(bio), disk 409 drivers/nvdimm/nd.h &disk->part0); disk 414 drivers/nvdimm/nd.h struct gendisk *disk = bio->bi_disk; disk 416 drivers/nvdimm/nd.h generic_end_io_acct(disk->queue, bio_op(bio), &disk->part0, start); disk 337 drivers/nvdimm/pmem.c del_gendisk(pmem->disk); disk 338 drivers/nvdimm/pmem.c put_disk(pmem->disk); disk 366 drivers/nvdimm/pmem.c struct gendisk *disk; disk 448 drivers/nvdimm/pmem.c disk = alloc_disk_node(0, nid); disk 449 drivers/nvdimm/pmem.c if (!disk) disk 451 drivers/nvdimm/pmem.c pmem->disk = disk; disk 453 drivers/nvdimm/pmem.c disk->fops = &pmem_fops; disk 454 drivers/nvdimm/pmem.c disk->queue = q; disk 455 drivers/nvdimm/pmem.c disk->flags = GENHD_FL_EXT_DEVT; disk 456 drivers/nvdimm/pmem.c disk->queue->backing_dev_info->capabilities |= BDI_CAP_SYNCHRONOUS_IO; disk 457 drivers/nvdimm/pmem.c nvdimm_namespace_disk_name(ndns, disk->disk_name); disk 458 drivers/nvdimm/pmem.c set_capacity(disk, (pmem->size - pmem->pfn_pad - pmem->data_offset) disk 463 drivers/nvdimm/pmem.c disk->bb = &pmem->bb; disk 467 drivers/nvdimm/pmem.c dax_dev = alloc_dax(pmem, disk->disk_name, &pmem_dax_ops, flags); disk 469 drivers/nvdimm/pmem.c put_disk(disk); disk 474 drivers/nvdimm/pmem.c gendev = disk_to_dev(disk); disk 477 drivers/nvdimm/pmem.c device_add_disk(dev, disk, NULL); disk 481 drivers/nvdimm/pmem.c revalidate_disk(disk); disk 483 drivers/nvdimm/pmem.c pmem->bb_state = sysfs_get_dirent(disk_to_dev(disk)->kobj.sd, disk 25 drivers/nvdimm/pmem.h struct gendisk *disk; disk 93 drivers/nvme/host/core.c static int nvme_revalidate_disk(struct gendisk *disk); disk 104 drivers/nvme/host/core.c if (!ns->disk || test_and_set_bit(NVME_NS_DEAD, &ns->flags)) disk 112 drivers/nvme/host/core.c revalidate_disk(ns->disk); disk 459 drivers/nvme/host/core.c put_disk(ns->disk); disk 903 drivers/nvme/host/core.c struct gendisk *disk = ns ? ns->disk : NULL; disk 922 drivers/nvme/host/core.c bio->bi_disk = disk; disk 923 drivers/nvme/host/core.c if (disk && meta_buffer && meta_len) { disk 934 drivers/nvme/host/core.c blk_execute_rq(req->q, disk, req, 0); disk 1373 drivers/nvme/host/core.c if (ns->disk && nvme_revalidate_disk(ns->disk)) disk 1499 drivers/nvme/host/core.c static struct nvme_ns *nvme_get_ns_from_disk(struct gendisk *disk, disk 1503 drivers/nvme/host/core.c if (disk->fops == &nvme_ns_head_ops) { disk 1506 drivers/nvme/host/core.c *head = disk->private_data; disk 1516 drivers/nvme/host/core.c return disk->private_data; disk 1611 drivers/nvme/host/core.c if (WARN_ON_ONCE(ns->head->disk)) disk 1627 drivers/nvme/host/core.c static void nvme_release(struct gendisk *disk, fmode_t mode) disk 1629 drivers/nvme/host/core.c struct nvme_ns *ns = disk->private_data; disk 1645 drivers/nvme/host/core.c static void nvme_init_integrity(struct gendisk *disk, u16 ms, u8 pi_type) disk 1667 drivers/nvme/host/core.c blk_integrity_register(disk, &integrity); disk 1668 drivers/nvme/host/core.c blk_queue_max_integrity_segments(disk->queue, 1); disk 1671 drivers/nvme/host/core.c static void nvme_init_integrity(struct gendisk *disk, u16 ms, u8 pi_type) disk 1682 drivers/nvme/host/core.c static void nvme_config_discard(struct gendisk *disk, struct nvme_ns *ns) disk 1685 drivers/nvme/host/core.c struct request_queue *queue = disk->queue; disk 1713 drivers/nvme/host/core.c static void nvme_config_write_zeroes(struct gendisk *disk, struct nvme_ns *ns) disk 1736 drivers/nvme/host/core.c blk_queue_max_write_zeroes_sectors(disk->queue, max_sectors); disk 1767 drivers/nvme/host/core.c static void nvme_update_disk_info(struct gendisk *disk, disk 1778 drivers/nvme/host/core.c blk_mq_freeze_queue(disk->queue); disk 1779 drivers/nvme/host/core.c blk_integrity_unregister(disk); disk 1803 drivers/nvme/host/core.c blk_queue_logical_block_size(disk->queue, bs); disk 1809 drivers/nvme/host/core.c blk_queue_physical_block_size(disk->queue, min(phys_bs, atomic_bs)); disk 1810 drivers/nvme/host/core.c blk_queue_io_min(disk->queue, phys_bs); disk 1811 drivers/nvme/host/core.c blk_queue_io_opt(disk->queue, io_opt); disk 1815 drivers/nvme/host/core.c nvme_init_integrity(disk, ns->ms, ns->pi_type); disk 1816 drivers/nvme/host/core.c if ((ns->ms && !nvme_ns_has_pi(ns) && !blk_get_integrity(disk)) || disk 1820 drivers/nvme/host/core.c set_capacity(disk, capacity); disk 1822 drivers/nvme/host/core.c nvme_config_discard(disk, ns); disk 1823 drivers/nvme/host/core.c nvme_config_write_zeroes(disk, ns); disk 1826 drivers/nvme/host/core.c set_disk_ro(disk, true); disk 1828 drivers/nvme/host/core.c set_disk_ro(disk, false); disk 1830 drivers/nvme/host/core.c blk_mq_unfreeze_queue(disk->queue); disk 1833 drivers/nvme/host/core.c static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id) disk 1835 drivers/nvme/host/core.c struct nvme_ns *ns = disk->private_data; disk 1855 drivers/nvme/host/core.c nvme_update_disk_info(disk, ns, id); disk 1857 drivers/nvme/host/core.c if (ns->head->disk) { disk 1858 drivers/nvme/host/core.c nvme_update_disk_info(ns->head->disk, ns, id); disk 1859 drivers/nvme/host/core.c blk_queue_stack_limits(ns->head->disk->queue, ns->queue); disk 1860 drivers/nvme/host/core.c revalidate_disk(ns->head->disk); disk 1865 drivers/nvme/host/core.c static int nvme_revalidate_disk(struct gendisk *disk) disk 1867 drivers/nvme/host/core.c struct nvme_ns *ns = disk->private_data; disk 1874 drivers/nvme/host/core.c set_capacity(disk, 0); disk 1887 drivers/nvme/host/core.c __nvme_revalidate_disk(disk, id); disk 2055 drivers/nvme/host/core.c static void nvme_ns_head_release(struct gendisk *disk, fmode_t mode) disk 2057 drivers/nvme/host/core.c nvme_put_ns_head(disk->private_data); disk 3026 drivers/nvme/host/core.c struct gendisk *disk = dev_to_disk(dev); disk 3028 drivers/nvme/host/core.c if (disk->fops == &nvme_fops) disk 3031 drivers/nvme/host/core.c return disk->private_data; disk 3483 drivers/nvme/host/core.c struct gendisk *disk; disk 3530 drivers/nvme/host/core.c disk = alloc_disk_node(0, node); disk 3531 drivers/nvme/host/core.c if (!disk) { disk 3536 drivers/nvme/host/core.c disk->fops = &nvme_fops; disk 3537 drivers/nvme/host/core.c disk->private_data = ns; disk 3538 drivers/nvme/host/core.c disk->queue = ns->queue; disk 3539 drivers/nvme/host/core.c disk->flags = flags; disk 3540 drivers/nvme/host/core.c memcpy(disk->disk_name, disk_name, DISK_NAME_LEN); disk 3541 drivers/nvme/host/core.c ns->disk = disk; disk 3543 drivers/nvme/host/core.c __nvme_revalidate_disk(disk, id); disk 3559 drivers/nvme/host/core.c device_add_disk(ctrl->device, ns->disk, nvme_ns_id_attr_groups); disk 3562 drivers/nvme/host/core.c nvme_fault_inject_init(&ns->fault_inject, ns->disk->disk_name); disk 3568 drivers/nvme/host/core.c ns->disk->queue = NULL; disk 3569 drivers/nvme/host/core.c put_disk(ns->disk); disk 3600 drivers/nvme/host/core.c if (ns->disk && ns->disk->flags & GENHD_FL_UP) { disk 3601 drivers/nvme/host/core.c del_gendisk(ns->disk); disk 3603 drivers/nvme/host/core.c if (blk_get_integrity(ns->disk)) disk 3604 drivers/nvme/host/core.c blk_integrity_unregister(ns->disk); disk 3621 drivers/nvme/host/core.c if (ns->disk && revalidate_disk(ns->disk)) disk 59 drivers/nvme/host/fault_inject.c struct gendisk *disk = req->rq_disk; disk 63 drivers/nvme/host/fault_inject.c if (disk) { disk 64 drivers/nvme/host/fault_inject.c struct nvme_ns *ns = disk->private_data; disk 760 drivers/nvme/host/lightnvm.c struct gendisk *disk = ns->disk; disk 820 drivers/nvme/host/lightnvm.c bio->bi_disk = disk; disk 1242 drivers/nvme/host/lightnvm.c struct gendisk *disk = dev_to_disk(dev); disk 1243 drivers/nvme/host/lightnvm.c struct nvme_ns *ns = disk->private_data; disk 21 drivers/nvme/host/multipath.c if (h->disk) disk 22 drivers/nvme/host/multipath.c blk_mq_unfreeze_queue(h->disk->queue); disk 31 drivers/nvme/host/multipath.c if (h->disk) disk 32 drivers/nvme/host/multipath.c blk_mq_freeze_queue_wait(h->disk->queue); disk 41 drivers/nvme/host/multipath.c if (h->disk) disk 42 drivers/nvme/host/multipath.c blk_freeze_queue_start(h->disk->queue); disk 57 drivers/nvme/host/multipath.c } else if (ns->head->disk) { disk 123 drivers/nvme/host/multipath.c if (ns->head->disk) disk 300 drivers/nvme/host/multipath.c struct device *dev = disk_to_dev(head->disk); disk 316 drivers/nvme/host/multipath.c bio->bi_disk = ns->disk; disk 319 drivers/nvme/host/multipath.c disk_devt(ns->head->disk), disk 357 drivers/nvme/host/multipath.c bio->bi_disk = head->disk; disk 395 drivers/nvme/host/multipath.c head->disk = alloc_disk(0); disk 396 drivers/nvme/host/multipath.c if (!head->disk) disk 398 drivers/nvme/host/multipath.c head->disk->fops = &nvme_ns_head_ops; disk 399 drivers/nvme/host/multipath.c head->disk->private_data = head; disk 400 drivers/nvme/host/multipath.c head->disk->queue = q; disk 401 drivers/nvme/host/multipath.c head->disk->flags = GENHD_FL_EXT_DEVT; disk 402 drivers/nvme/host/multipath.c sprintf(head->disk->disk_name, "nvme%dn%d", disk 418 drivers/nvme/host/multipath.c if (!head->disk) disk 421 drivers/nvme/host/multipath.c if (!(head->disk->flags & GENHD_FL_UP)) disk 422 drivers/nvme/host/multipath.c device_add_disk(&head->subsys->dev, head->disk, disk 673 drivers/nvme/host/multipath.c if (!head->disk) disk 675 drivers/nvme/host/multipath.c if (head->disk->flags & GENHD_FL_UP) disk 676 drivers/nvme/host/multipath.c del_gendisk(head->disk); disk 677 drivers/nvme/host/multipath.c blk_set_queue_dying(head->disk->queue); disk 681 drivers/nvme/host/multipath.c blk_cleanup_queue(head->disk->queue); disk 682 drivers/nvme/host/multipath.c put_disk(head->disk); disk 343 drivers/nvme/host/nvme.h struct gendisk *disk; disk 357 drivers/nvme/host/nvme.h struct gendisk *disk; disk 540 drivers/nvme/host/nvme.h if (head->disk && list_empty(&head->list)) disk 550 drivers/nvme/host/nvme.h trace_block_bio_complete(ns->head->disk->queue, disk 38 drivers/nvme/host/trace.h static inline void __assign_disk_name(char *name, struct gendisk *disk) disk 40 drivers/nvme/host/trace.h if (disk) disk 41 drivers/nvme/host/trace.h memcpy(name, disk->disk_name, DISK_NAME_LEN); disk 51 drivers/nvme/host/trace.h __array(char, disk, DISK_NAME_LEN) disk 71 drivers/nvme/host/trace.h __assign_disk_name(__entry->disk, req->rq_disk); disk 76 drivers/nvme/host/trace.h __entry->ctrl_id, __print_disk_name(__entry->disk), disk 89 drivers/nvme/host/trace.h __array(char, disk, DISK_NAME_LEN) disk 106 drivers/nvme/host/trace.h __assign_disk_name(__entry->disk, req->rq_disk); disk 109 drivers/nvme/host/trace.h __entry->ctrl_id, __print_disk_name(__entry->disk), disk 149 drivers/nvme/host/trace.h __array(char, disk, DISK_NAME_LEN) disk 156 drivers/nvme/host/trace.h __assign_disk_name(__entry->disk, req->rq_disk); disk 162 drivers/nvme/host/trace.h __entry->ctrl_id, __print_disk_name(__entry->disk), disk 71 drivers/nvme/target/trace.h __array(char, disk, DISK_NAME_LEN) disk 84 drivers/nvme/target/trace.h __assign_disk_name(__entry->disk, req, true); disk 98 drivers/nvme/target/trace.h __print_disk_name(__entry->disk), disk 112 drivers/nvme/target/trace.h __array(char, disk, DISK_NAME_LEN) disk 124 drivers/nvme/target/trace.h __assign_disk_name(__entry->disk, req, false); disk 128 drivers/nvme/target/trace.h __print_disk_name(__entry->disk), disk 344 drivers/s390/block/dasd.c struct gendisk *disk; disk 355 drivers/s390/block/dasd.c disk = device->block->gdp; disk 356 drivers/s390/block/dasd.c kobject_uevent(&disk_to_dev(disk)->kobj, disk 433 drivers/s390/block/dasd.c struct gendisk *disk; disk 441 drivers/s390/block/dasd.c disk = device->block->gdp; disk 442 drivers/s390/block/dasd.c kobject_uevent(&disk_to_dev(disk)->kobj, KOBJ_CHANGE); disk 445 drivers/s390/block/dasd.c disk = device->block->bdev->bd_disk; disk 446 drivers/s390/block/dasd.c disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0); disk 460 drivers/s390/block/dasd.c struct gendisk *disk; disk 472 drivers/s390/block/dasd.c disk = device->block->bdev->bd_disk; disk 473 drivers/s390/block/dasd.c disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0); disk 3357 drivers/s390/block/dasd.c static void dasd_release(struct gendisk *disk, fmode_t mode) disk 3359 drivers/s390/block/dasd.c struct dasd_device *base = dasd_device_from_gendisk(disk); disk 33 drivers/s390/block/dcssblk.c static void dcssblk_release(struct gendisk *disk, fmode_t mode); disk 827 drivers/s390/block/dcssblk.c dcssblk_release(struct gendisk *disk, fmode_t mode) disk 829 drivers/s390/block/dcssblk.c struct dcssblk_dev_info *dev_info = disk->private_data; disk 369 drivers/s390/block/xpram.c struct gendisk *disk = xpram_disks[i]; disk 374 drivers/s390/block/xpram.c disk->major = XPRAM_MAJOR; disk 375 drivers/s390/block/xpram.c disk->first_minor = i; disk 376 drivers/s390/block/xpram.c disk->fops = &xpram_devops; disk 377 drivers/s390/block/xpram.c disk->private_data = &xpram_devices[i]; disk 378 drivers/s390/block/xpram.c disk->queue = xpram_queues[i]; disk 379 drivers/s390/block/xpram.c sprintf(disk->disk_name, "slram%d", i); disk 380 drivers/s390/block/xpram.c set_capacity(disk, xpram_sizes[i] << 1); disk 381 drivers/s390/block/xpram.c add_disk(disk); disk 1637 drivers/scsi/atp870u.c static int atp870u_biosparam(struct scsi_device *disk, struct block_device *dev, disk 928 drivers/scsi/esas2r/atvda.h struct atto_vda_ae_disk disk; disk 593 drivers/scsi/pcmcia/sym53c500_cs.c SYM53C500_biosparm(struct scsi_device *disk, disk 468 drivers/scsi/qlogicfas408.c int qlogicfas408_biosparam(struct scsi_device *disk, struct block_device *dev, disk 108 drivers/scsi/qlogicfas408.h int qlogicfas408_biosparam(struct scsi_device * disk, disk 110 drivers/scsi/sd.c static void sd_unlock_native_capacity(struct gendisk *disk); disk 154 drivers/scsi/sd.c blk_queue_write_cache(sdkp->disk->queue, wc, fua); disk 222 drivers/scsi/sd.c revalidate_disk(sdkp->disk); disk 623 drivers/scsi/sd.c static struct scsi_disk *scsi_disk_get(struct gendisk *disk) disk 629 drivers/scsi/sd.c if (disk->private_data) { disk 630 drivers/scsi/sd.c sdkp = scsi_disk(disk); disk 772 drivers/scsi/sd.c struct request_queue *q = sdkp->disk->queue; disk 948 drivers/scsi/sd.c struct request_queue *q = sdkp->disk->queue; disk 1408 drivers/scsi/sd.c static void sd_release(struct gendisk *disk, fmode_t mode) disk 1410 drivers/scsi/sd.c struct scsi_disk *sdkp = scsi_disk(disk); disk 1465 drivers/scsi/sd.c struct gendisk *disk = bdev->bd_disk; disk 1466 drivers/scsi/sd.c struct scsi_disk *sdkp = scsi_disk(disk); disk 1472 drivers/scsi/sd.c "cmd=0x%x\n", disk->disk_name, cmd)); disk 1552 drivers/scsi/sd.c static unsigned int sd_check_events(struct gendisk *disk, unsigned int clearing) disk 1554 drivers/scsi/sd.c struct scsi_disk *sdkp = scsi_disk_get(disk); disk 1685 drivers/scsi/sd.c revalidate_disk(sdkp->disk); disk 1697 drivers/scsi/sd.c struct gendisk *disk = bdev->bd_disk; disk 1698 drivers/scsi/sd.c struct scsi_disk *sdkp = scsi_disk(disk); disk 2588 drivers/scsi/sd.c set_disk_ro(sdkp->disk, 0); disk 2626 drivers/scsi/sd.c set_disk_ro(sdkp->disk, sdkp->write_prot); disk 2873 drivers/scsi/sd.c blk_queue_io_min(sdkp->disk->queue, disk 2928 drivers/scsi/sd.c struct request_queue *q = sdkp->disk->queue; disk 3098 drivers/scsi/sd.c static int sd_revalidate_disk(struct gendisk *disk) disk 3100 drivers/scsi/sd.c struct scsi_disk *sdkp = scsi_disk(disk); disk 3102 drivers/scsi/sd.c struct request_queue *q = sdkp->disk->queue; disk 3194 drivers/scsi/sd.c set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity)); disk 3214 drivers/scsi/sd.c static void sd_unlock_native_capacity(struct gendisk *disk) disk 3216 drivers/scsi/sd.c struct scsi_device *sdev = scsi_disk(disk)->device; disk 3332 drivers/scsi/sd.c sdkp->disk = gd; disk 3432 drivers/scsi/sd.c devt = disk_devt(sdkp->disk); disk 3437 drivers/scsi/sd.c del_gendisk(sdkp->disk); disk 3465 drivers/scsi/sd.c struct gendisk *disk = sdkp->disk; disk 3466 drivers/scsi/sd.c struct request_queue *q = disk->queue; disk 3481 drivers/scsi/sd.c disk->private_data = NULL; disk 3482 drivers/scsi/sd.c put_disk(disk); disk 3722 drivers/scsi/sd.c sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr); disk 74 drivers/scsi/sd.h struct gendisk *disk; disk 122 drivers/scsi/sd.h static inline struct scsi_disk *scsi_disk(struct gendisk *disk) disk 124 drivers/scsi/sd.h return container_of(disk->private_data, struct scsi_disk, driver); disk 128 drivers/scsi/sd.h (sdsk)->disk ? \ disk 130 drivers/scsi/sd.h (sdsk)->disk->disk_name, fmt, ##a) : \ disk 197 drivers/scsi/sd.h static inline void sd_dif_config_host(struct scsi_disk *disk) disk 215 drivers/scsi/sd.h extern int sd_zbc_report_zones(struct gendisk *disk, sector_t sector, disk 30 drivers/scsi/sd_dif.c struct gendisk *disk = sdkp->disk; disk 81 drivers/scsi/sd_dif.c blk_integrity_register(disk, &bi); disk 128 drivers/scsi/sd_zbc.c struct request_queue *q = sdkp->disk->queue; disk 163 drivers/scsi/sd_zbc.c int sd_zbc_report_zones(struct gendisk *disk, sector_t sector, disk 166 drivers/scsi/sd_zbc.c struct scsi_disk *sdkp = scsi_disk(disk); disk 458 drivers/scsi/sd_zbc.c struct gendisk *disk = sdkp->disk; disk 484 drivers/scsi/sd_zbc.c blk_queue_chunk_sectors(sdkp->disk->queue, disk 486 drivers/scsi/sd_zbc.c blk_queue_flag_set(QUEUE_FLAG_ZONE_RESETALL, sdkp->disk->queue); disk 487 drivers/scsi/sd_zbc.c blk_queue_required_elevator_features(sdkp->disk->queue, disk 508 drivers/scsi/sd_zbc.c disk->queue->nr_zones != nr_zones) { disk 509 drivers/scsi/sd_zbc.c ret = blk_revalidate_disk_zones(disk); disk 169 drivers/scsi/sg.c struct gendisk *disk; disk 206 drivers/scsi/sg.c (sdp)->disk->disk_name, fmt, ##a) disk 842 drivers/scsi/sg.c blk_execute_rq_nowait(sdp->device->request_queue, sdp->disk, disk 1117 drivers/scsi/sg.c sdp->disk->disk_name, disk 1438 drivers/scsi/sg.c sg_alloc(struct gendisk *disk, struct scsi_device *scsidp) disk 1474 drivers/scsi/sg.c sprintf(disk->disk_name, "sg%d", k); disk 1475 drivers/scsi/sg.c disk->first_minor = k; disk 1476 drivers/scsi/sg.c sdp->disk = disk; disk 1503 drivers/scsi/sg.c struct gendisk *disk; disk 1509 drivers/scsi/sg.c disk = alloc_disk(1); disk 1510 drivers/scsi/sg.c if (!disk) { disk 1514 drivers/scsi/sg.c disk->major = SCSI_GENERIC_MAJOR; disk 1525 drivers/scsi/sg.c sdp = sg_alloc(disk, scsidp); disk 1543 drivers/scsi/sg.c sdp, "%s", disk->disk_name); disk 1571 drivers/scsi/sg.c put_disk(disk); disk 1595 drivers/scsi/sg.c put_disk(sdp->disk); disk 2596 drivers/scsi/sg.c seq_printf(s, " >>> device=%s ", sdp->disk->disk_name); disk 140 drivers/scsi/sr.c static inline struct scsi_cd *scsi_cd(struct gendisk *disk) disk 142 drivers/scsi/sr.c return container_of(disk->private_data, struct scsi_cd, driver); disk 162 drivers/scsi/sr.c static inline struct scsi_cd *scsi_cd_get(struct gendisk *disk) disk 167 drivers/scsi/sr.c if (disk->private_data == NULL) disk 169 drivers/scsi/sr.c cd = scsi_cd(disk); disk 371 drivers/scsi/sr.c if (error_sector < get_capacity(cd->disk) && disk 373 drivers/scsi/sr.c set_capacity(cd->disk, error_sector); disk 550 drivers/scsi/sr.c static void sr_block_release(struct gendisk *disk, fmode_t mode) disk 552 drivers/scsi/sr.c struct scsi_cd *cd = scsi_cd(disk); disk 601 drivers/scsi/sr.c static unsigned int sr_block_check_events(struct gendisk *disk, disk 607 drivers/scsi/sr.c cd = scsi_cd_get(disk); disk 618 drivers/scsi/sr.c static int sr_block_revalidate_disk(struct gendisk *disk) disk 623 drivers/scsi/sr.c cd = scsi_cd_get(disk); disk 684 drivers/scsi/sr.c struct gendisk *disk; disk 700 drivers/scsi/sr.c disk = alloc_disk(1); disk 701 drivers/scsi/sr.c if (!disk) disk 714 drivers/scsi/sr.c disk->major = SCSI_CDROM_MAJOR; disk 715 drivers/scsi/sr.c disk->first_minor = minor; disk 716 drivers/scsi/sr.c sprintf(disk->disk_name, "sr%d", minor); disk 717 drivers/scsi/sr.c disk->fops = &sr_bdops; disk 718 drivers/scsi/sr.c disk->flags = GENHD_FL_CD | GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE; disk 719 drivers/scsi/sr.c disk->events = DISK_EVENT_MEDIA_CHANGE | DISK_EVENT_EJECT_REQUEST; disk 720 drivers/scsi/sr.c disk->event_flags = DISK_EVENT_FLAG_POLL | DISK_EVENT_FLAG_UEVENT; disk 725 drivers/scsi/sr.c cd->disk = disk; disk 727 drivers/scsi/sr.c cd->disk = disk; disk 747 drivers/scsi/sr.c set_capacity(disk, cd->capacity); disk 748 drivers/scsi/sr.c disk->private_data = &cd->driver; disk 749 drivers/scsi/sr.c disk->queue = sdev->request_queue; disk 750 drivers/scsi/sr.c cd->cdi.disk = disk; disk 762 drivers/scsi/sr.c disk->flags |= GENHD_FL_REMOVABLE; disk 763 drivers/scsi/sr.c device_add_disk(&sdev->sdev_gendev, disk, NULL); disk 772 drivers/scsi/sr.c put_disk(disk); disk 853 drivers/scsi/sr.c set_capacity(cd->disk, cd->capacity); disk 1001 drivers/scsi/sr.c struct gendisk *disk = cd->disk; disk 1004 drivers/scsi/sr.c clear_bit(MINOR(disk_devt(disk)), sr_index_bits); disk 1009 drivers/scsi/sr.c disk->private_data = NULL; disk 1011 drivers/scsi/sr.c put_disk(disk); disk 1022 drivers/scsi/sr.c del_gendisk(cd->disk); disk 57 drivers/scsi/sr.h struct gendisk *disk; disk 312 drivers/scsi/st.c return tape->disk->disk_name; disk 3841 drivers/scsi/st.c i = scsi_cmd_ioctl(STp->disk->queue, STp->disk, disk 4203 drivers/scsi/st.c tape->disk->disk_name, st_formats[i]); disk 4258 drivers/scsi/st.c struct gendisk *disk = NULL; disk 4288 drivers/scsi/st.c disk = alloc_disk(1); disk 4289 drivers/scsi/st.c if (!disk) { disk 4302 drivers/scsi/st.c tpnt->disk = disk; disk 4303 drivers/scsi/st.c disk->private_data = &tpnt->driver; disk 4308 drivers/scsi/st.c disk->queue = SDp->request_queue; disk 4385 drivers/scsi/st.c sprintf(disk->disk_name, "st%d", tpnt->index); disk 4417 drivers/scsi/st.c blk_put_queue(disk->queue); disk 4419 drivers/scsi/st.c put_disk(disk); disk 4458 drivers/scsi/st.c struct gendisk *disk = tpnt->disk; disk 4468 drivers/scsi/st.c disk->private_data = NULL; disk 4469 drivers/scsi/st.c put_disk(disk); disk 192 drivers/scsi/st.h struct gendisk *disk; disk 521 drivers/usb/storage/transport.c struct gendisk *disk; disk 549 drivers/usb/storage/transport.c disk = srb->request->rq_disk; disk 550 drivers/usb/storage/transport.c if (!disk) disk 552 drivers/usb/storage/transport.c sdkp = scsi_disk(disk); disk 1101 fs/block_dev.c struct gendisk *disk = get_gendisk(bdev->bd_dev, partno); disk 1103 fs/block_dev.c if (!disk) disk 1114 fs/block_dev.c put_disk_and_module(disk); disk 1117 fs/block_dev.c return disk; disk 1145 fs/block_dev.c struct gendisk *disk; disk 1155 fs/block_dev.c disk = bdev_get_gendisk(bdev, &partno); disk 1156 fs/block_dev.c if (!disk) disk 1168 fs/block_dev.c whole = bdget_disk(disk, 0); disk 1172 fs/block_dev.c put_disk_and_module(disk); disk 1250 fs/block_dev.c struct gendisk *disk; disk 1255 fs/block_dev.c struct gendisk *disk) disk 1260 fs/block_dev.c if (holder->disk == disk) disk 1303 fs/block_dev.c int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk) disk 1313 fs/block_dev.c if (WARN_ON(!disk->slave_dir || !bdev->bd_part->holder_dir)) disk 1316 fs/block_dev.c holder = bd_find_holder_disk(bdev, disk); disk 1329 fs/block_dev.c holder->disk = disk; disk 1332 fs/block_dev.c ret = add_symlink(disk->slave_dir, &part_to_dev(bdev->bd_part)->kobj); disk 1336 fs/block_dev.c ret = add_symlink(bdev->bd_part->holder_dir, &disk_to_dev(disk)->kobj); disk 1349 fs/block_dev.c del_symlink(disk->slave_dir, &part_to_dev(bdev->bd_part)->kobj); disk 1368 fs/block_dev.c void bd_unlink_disk_holder(struct block_device *bdev, struct gendisk *disk) disk 1374 fs/block_dev.c holder = bd_find_holder_disk(bdev, disk); disk 1377 fs/block_dev.c del_symlink(disk->slave_dir, &part_to_dev(bdev->bd_part)->kobj); disk 1379 fs/block_dev.c &disk_to_dev(disk)->kobj); disk 1420 fs/block_dev.c void check_disk_size_change(struct gendisk *disk, struct block_device *bdev, disk 1425 fs/block_dev.c disk_size = (loff_t)get_capacity(disk) << 9; disk 1431 fs/block_dev.c disk->disk_name, bdev_size, disk_size); disk 1447 fs/block_dev.c int revalidate_disk(struct gendisk *disk) disk 1451 fs/block_dev.c if (disk->fops->revalidate_disk) disk 1452 fs/block_dev.c ret = disk->fops->revalidate_disk(disk); disk 1458 fs/block_dev.c if (!(disk->flags & GENHD_FL_HIDDEN)) { disk 1459 fs/block_dev.c struct block_device *bdev = bdget_disk(disk, 0); disk 1465 fs/block_dev.c check_disk_size_change(disk, bdev, ret == 0); disk 1485 fs/block_dev.c struct gendisk *disk = bdev->bd_disk; disk 1486 fs/block_dev.c const struct block_device_operations *bdops = disk->fops; disk 1489 fs/block_dev.c events = disk_clear_events(disk, DISK_EVENT_MEDIA_CHANGE | disk 1534 fs/block_dev.c struct gendisk *disk; disk 1558 fs/block_dev.c disk = bdev_get_gendisk(bdev, &partno); disk 1559 fs/block_dev.c if (!disk) disk 1562 fs/block_dev.c disk_block_events(disk); disk 1566 fs/block_dev.c bdev->bd_disk = disk; disk 1567 fs/block_dev.c bdev->bd_queue = disk->queue; disk 1573 fs/block_dev.c bdev->bd_part = disk_get_part(disk, partno); disk 1578 fs/block_dev.c if (disk->fops->open) { disk 1579 fs/block_dev.c ret = disk->fops->open(bdev, mode); disk 1590 fs/block_dev.c disk_unblock_events(disk); disk 1591 fs/block_dev.c put_disk_and_module(disk); disk 1597 fs/block_dev.c bd_set_size(bdev,(loff_t)get_capacity(disk)<<9); disk 1615 fs/block_dev.c whole = bdget_disk(disk, 0); disk 1624 fs/block_dev.c bdev->bd_part = disk_get_part(disk, partno); disk 1625 fs/block_dev.c if (!(disk->flags & GENHD_FL_UP) || disk 1635 fs/block_dev.c bdev->bd_bdi = bdi_get(disk->queue->backing_dev_info); disk 1653 fs/block_dev.c disk_unblock_events(disk); disk 1656 fs/block_dev.c put_disk_and_module(disk); disk 1669 fs/block_dev.c disk_unblock_events(disk); disk 1670 fs/block_dev.c put_disk_and_module(disk); disk 1714 fs/block_dev.c struct gendisk *disk = whole->bd_disk; disk 1730 fs/block_dev.c (disk->flags & GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE)) { disk 1732 fs/block_dev.c disk_block_events(disk); disk 1855 fs/block_dev.c struct gendisk *disk = bdev->bd_disk; disk 1870 fs/block_dev.c if (disk->fops->release) disk 1871 fs/block_dev.c disk->fops->release(disk, mode); disk 1881 fs/block_dev.c put_disk_and_module(disk); disk 1549 fs/btrfs/ctree.c static int comp_keys(const struct btrfs_disk_key *disk, disk 1554 fs/btrfs/ctree.c btrfs_disk_key_to_cpu(&k1, disk); disk 1837 fs/btrfs/ctree.h const struct btrfs_disk_key *disk) disk 1839 fs/btrfs/ctree.h cpu->offset = le64_to_cpu(disk->offset); disk 1840 fs/btrfs/ctree.h cpu->type = disk->type; disk 1841 fs/btrfs/ctree.h cpu->objectid = le64_to_cpu(disk->objectid); disk 1844 fs/btrfs/ctree.h static inline void btrfs_cpu_key_to_disk(struct btrfs_disk_key *disk, disk 1847 fs/btrfs/ctree.h disk->offset = cpu_to_le64(cpu->offset); disk 1848 fs/btrfs/ctree.h disk->type = cpu->type; disk 1849 fs/btrfs/ctree.h disk->objectid = cpu_to_le64(cpu->objectid); disk 2074 fs/btrfs/ctree.h const struct btrfs_disk_balance_args *disk) disk 2078 fs/btrfs/ctree.h cpu->profiles = le64_to_cpu(disk->profiles); disk 2079 fs/btrfs/ctree.h cpu->usage = le64_to_cpu(disk->usage); disk 2080 fs/btrfs/ctree.h cpu->devid = le64_to_cpu(disk->devid); disk 2081 fs/btrfs/ctree.h cpu->pstart = le64_to_cpu(disk->pstart); disk 2082 fs/btrfs/ctree.h cpu->pend = le64_to_cpu(disk->pend); disk 2083 fs/btrfs/ctree.h cpu->vstart = le64_to_cpu(disk->vstart); disk 2084 fs/btrfs/ctree.h cpu->vend = le64_to_cpu(disk->vend); disk 2085 fs/btrfs/ctree.h cpu->target = le64_to_cpu(disk->target); disk 2086 fs/btrfs/ctree.h cpu->flags = le64_to_cpu(disk->flags); disk 2087 fs/btrfs/ctree.h cpu->limit = le64_to_cpu(disk->limit); disk 2088 fs/btrfs/ctree.h cpu->stripes_min = le32_to_cpu(disk->stripes_min); disk 2089 fs/btrfs/ctree.h cpu->stripes_max = le32_to_cpu(disk->stripes_max); disk 2093 fs/btrfs/ctree.h btrfs_cpu_balance_args_to_disk(struct btrfs_disk_balance_args *disk, disk 2096 fs/btrfs/ctree.h memset(disk, 0, sizeof(*disk)); disk 2098 fs/btrfs/ctree.h disk->profiles = cpu_to_le64(cpu->profiles); disk 2099 fs/btrfs/ctree.h disk->usage = cpu_to_le64(cpu->usage); disk 2100 fs/btrfs/ctree.h disk->devid = cpu_to_le64(cpu->devid); disk 2101 fs/btrfs/ctree.h disk->pstart = cpu_to_le64(cpu->pstart); disk 2102 fs/btrfs/ctree.h disk->pend = cpu_to_le64(cpu->pend); disk 2103 fs/btrfs/ctree.h disk->vstart = cpu_to_le64(cpu->vstart); disk 2104 fs/btrfs/ctree.h disk->vend = cpu_to_le64(cpu->vend); disk 2105 fs/btrfs/ctree.h disk->target = cpu_to_le64(cpu->target); disk 2106 fs/btrfs/ctree.h disk->flags = cpu_to_le64(cpu->flags); disk 2107 fs/btrfs/ctree.h disk->limit = cpu_to_le64(cpu->limit); disk 2108 fs/btrfs/ctree.h disk->stripes_min = cpu_to_le32(cpu->stripes_min); disk 2109 fs/btrfs/ctree.h disk->stripes_max = cpu_to_le32(cpu->stripes_max); disk 930 fs/btrfs/sysfs.c struct hd_struct *disk; disk 937 fs/btrfs/sysfs.c disk = one_device->bdev->bd_part; disk 938 fs/btrfs/sysfs.c disk_kobj = &part_to_dev(disk)->kobj; disk 951 fs/btrfs/sysfs.c disk = one_device->bdev->bd_part; disk 952 fs/btrfs/sysfs.c disk_kobj = &part_to_dev(disk)->kobj; disk 980 fs/btrfs/sysfs.c struct hd_struct *disk; disk 989 fs/btrfs/sysfs.c disk = dev->bdev->bd_part; disk 990 fs/btrfs/sysfs.c disk_kobj = &part_to_dev(disk)->kobj; disk 213 fs/quota/quota_tree.c int qtree_entry_unused(struct qtree_mem_dqinfo *info, char *disk) disk 218 fs/quota/quota_tree.c if (disk[i]) disk 232 include/linux/blk-cgroup.h struct gendisk *disk; disk 365 include/linux/blkdev.h extern int blk_revalidate_disk_zones(struct gendisk *disk); disk 379 include/linux/blkdev.h static inline int blk_revalidate_disk_zones(struct gendisk *disk) disk 848 include/linux/blkdev.h extern int blk_register_queue(struct gendisk *disk); disk 849 include/linux/blkdev.h extern void blk_unregister_queue(struct gendisk *disk); disk 1098 include/linux/blkdev.h extern void disk_stack_limits(struct gendisk *disk, struct block_device *bdev, disk 1549 include/linux/blkdev.h static inline struct blk_integrity *blk_get_integrity(struct gendisk *disk) disk 1551 include/linux/blkdev.h struct blk_integrity *bi = &disk->queue->integrity; disk 1641 include/linux/blkdev.h static inline struct blk_integrity *blk_get_integrity(struct gendisk *disk) disk 1702 include/linux/blkdev.h unsigned int (*check_events) (struct gendisk *disk, disk 43 include/linux/cdrom.h struct gendisk *disk; /* matching block layer disk */ disk 23 include/linux/dqblk_qtree.h void (*mem2disk_dqblk)(void *disk, struct dquot *dquot); /* Convert given entry from in memory format to disk one */ disk 24 include/linux/dqblk_qtree.h void (*disk2mem_dqblk)(struct dquot *dquot, void *disk); /* Convert given entry from disk format to in memory one */ disk 25 include/linux/dqblk_qtree.h int (*is_id)(void *disk, struct dquot *dquot); /* Is this structure for given id? */ disk 46 include/linux/dqblk_qtree.h int qtree_entry_unused(struct qtree_mem_dqinfo *info, char *disk); disk 259 include/linux/drbd.h unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */ disk 277 include/linux/drbd.h unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */ disk 2647 include/linux/fs.h extern int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk); disk 2649 include/linux/fs.h struct gendisk *disk); disk 2652 include/linux/fs.h struct gendisk *disk) disk 2657 include/linux/fs.h struct gendisk *disk) disk 2714 include/linux/fs.h extern void check_disk_size_change(struct gendisk *disk, disk 26 include/linux/genhd.h #define disk_to_dev(disk) (&(disk)->part0.__dev) disk 235 include/linux/genhd.h static inline int disk_max_parts(struct gendisk *disk) disk 237 include/linux/genhd.h if (disk->flags & GENHD_FL_EXT_DEVT) disk 239 include/linux/genhd.h return disk->minors; disk 242 include/linux/genhd.h static inline bool disk_part_scan_enabled(struct gendisk *disk) disk 244 include/linux/genhd.h return disk_max_parts(disk) > 1 && disk 245 include/linux/genhd.h !(disk->flags & GENHD_FL_NO_PART_SCAN); disk 248 include/linux/genhd.h static inline dev_t disk_devt(struct gendisk *disk) disk 250 include/linux/genhd.h return MKDEV(disk->major, disk->first_minor); disk 258 include/linux/genhd.h extern struct hd_struct *__disk_get_part(struct gendisk *disk, int partno); disk 259 include/linux/genhd.h extern struct hd_struct *disk_get_part(struct gendisk *disk, int partno); disk 276 include/linux/genhd.h struct gendisk *disk; disk 283 include/linux/genhd.h struct gendisk *disk, unsigned int flags); disk 287 include/linux/genhd.h extern struct hd_struct *disk_map_sector_rcu(struct gendisk *disk, disk 409 include/linux/genhd.h static inline struct partition_meta_info *alloc_part_info(struct gendisk *disk) disk 411 include/linux/genhd.h if (disk) disk 413 include/linux/genhd.h GFP_KERNEL, disk->node_id); disk 425 include/linux/genhd.h extern void device_add_disk(struct device *parent, struct gendisk *disk, disk 427 include/linux/genhd.h static inline void add_disk(struct gendisk *disk) disk 429 include/linux/genhd.h device_add_disk(NULL, disk, NULL); disk 431 include/linux/genhd.h extern void device_add_disk_no_queue_reg(struct device *parent, struct gendisk *disk); disk 432 include/linux/genhd.h static inline void add_disk_no_queue_reg(struct gendisk *disk) disk 434 include/linux/genhd.h device_add_disk_no_queue_reg(NULL, disk); disk 439 include/linux/genhd.h extern struct block_device *bdget_disk(struct gendisk *disk, int partno); disk 442 include/linux/genhd.h extern void set_disk_ro(struct gendisk *disk, int flag); disk 444 include/linux/genhd.h static inline int get_disk_ro(struct gendisk *disk) disk 446 include/linux/genhd.h return disk->part0.policy; disk 449 include/linux/genhd.h extern void disk_block_events(struct gendisk *disk); disk 450 include/linux/genhd.h extern void disk_unblock_events(struct gendisk *disk); disk 451 include/linux/genhd.h extern void disk_flush_events(struct gendisk *disk, unsigned int mask); disk 452 include/linux/genhd.h extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask); disk 455 include/linux/genhd.h extern void add_disk_randomness(struct gendisk *disk) __latent_entropy; disk 456 include/linux/genhd.h extern void rand_initialize_disk(struct gendisk *disk); disk 462 include/linux/genhd.h static inline sector_t get_capacity(struct gendisk *disk) disk 464 include/linux/genhd.h return disk->part0.nr_sects; disk 466 include/linux/genhd.h static inline void set_capacity(struct gendisk *disk, sector_t size) disk 468 include/linux/genhd.h disk->part0.nr_sects = size; disk 624 include/linux/genhd.h extern int disk_expand_part_tbl(struct gendisk *disk, int target); disk 625 include/linux/genhd.h extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); disk 626 include/linux/genhd.h extern int invalidate_partitions(struct gendisk *disk, struct block_device *bdev); disk 627 include/linux/genhd.h extern struct hd_struct * __must_check add_partition(struct gendisk *disk, disk 637 include/linux/genhd.h extern struct kobject *get_disk_and_module(struct gendisk *disk); disk 638 include/linux/genhd.h extern void put_disk(struct gendisk *disk); disk 639 include/linux/genhd.h extern void put_disk_and_module(struct gendisk *disk); disk 769 include/linux/genhd.h static inline void blk_integrity_add(struct gendisk *disk) { } disk 770 include/linux/genhd.h static inline void blk_integrity_del(struct gendisk *disk) { } disk 634 include/linux/ide.h #define ide_drv_g(disk, cont_type) \ disk 635 include/linux/ide.h container_of((disk)->private_data, struct cont_type, driver) disk 264 include/linux/lightnvm.h struct gendisk *disk; disk 30 include/linux/mtd/blktrans.h struct gendisk *disk; disk 192 include/linux/pktcdvd.h struct gendisk *disk; disk 26 include/trace/events/bcache.h __entry->orig_major = d->disk->major; disk 27 include/trace/events/bcache.h __entry->orig_minor = d->disk->first_minor; disk 113 init/do_mounts.c struct gendisk *disk; disk 153 init/do_mounts.c disk = part_to_disk(dev_to_part(dev)); disk 154 init/do_mounts.c part = disk_get_part(disk, dev_to_part(dev)->partno + offset); disk 181 init/do_mounts_rd.c int nblocks, i, disk; disk 246 init/do_mounts_rd.c for (i = 0, disk = 1; i < nblocks; i++) { disk 248 init/do_mounts_rd.c pr_cont("done disk #%d.\n", disk++); disk 254 init/do_mounts_rd.c change_floppy("disk #%d", disk); disk 260 init/do_mounts_rd.c printk("Loading disk #%d... ", disk); disk 1048 kernel/power/hibernate.c power_attr(disk); disk 75 mm/page_io.c struct gendisk *disk; disk 107 mm/page_io.c disk = sis->bdev->bd_disk; disk 109 mm/page_io.c if (disk->fops->swap_slot_free_notify && __swap_count(entry) == 1) { disk 115 mm/page_io.c disk->fops->swap_slot_free_notify(sis->bdev, disk 356 mm/page_io.c struct gendisk *disk; disk 395 mm/page_io.c disk = bio->bi_disk; disk 414 mm/page_io.c if (!blk_poll(disk->queue, qc, true)) disk 135 tools/laptop/dslm/dslm.c char *disk = 0; disk 140 tools/laptop/dslm/dslm.c disk = argv[1]; disk 143 tools/laptop/dslm/dslm.c disk = argv[3]; disk 147 tools/laptop/dslm/dslm.c if (!(fd = open(disk, O_RDONLY|O_NONBLOCK))) { disk 148 tools/laptop/dslm/dslm.c printf("Can't open %s, because: %s\n", disk, strerror(errno));