/openbmc/linux/block/ |
H A D | genhd.c | 59 void set_capacity(struct gendisk *disk, sector_t sectors) in set_capacity() argument 61 bdev_set_nr_sectors(disk->part0, sectors); in set_capacity() 66 * Set disk capacity and notify if the size is not currently zero and will not 69 bool set_capacity_and_notify(struct gendisk *disk, sector_t size) in set_capacity_and_notify() argument 71 sector_t capacity = get_capacity(disk); in set_capacity_and_notify() 74 set_capacity(disk, size); in set_capacity_and_notify() 82 !disk_live(disk) || in set_capacity_and_notify() 83 (disk->flags & GENHD_FL_HIDDEN)) in set_capacity_and_notify() 87 disk->disk_name, capacity, size); in set_capacity_and_notify() 95 kobject_uevent_env(&disk_to_dev(disk) in set_capacity_and_notify() 322 disk_uevent(struct gendisk * disk,enum kobject_action action) disk_uevent() argument 343 disk_scan_partitions(struct gendisk * disk,blk_mode_t mode) disk_scan_partitions() argument 394 device_add_disk(struct device * parent,struct gendisk * disk,const struct attribute_group ** groups) device_add_disk() argument 557 blk_report_disk_dead(struct gendisk * disk,bool surprise) blk_report_disk_dead() argument 576 __blk_mark_disk_dead(struct gendisk * disk) __blk_mark_disk_dead() argument 605 blk_mark_disk_dead(struct gendisk * disk) blk_mark_disk_dead() argument 631 del_gendisk(struct gendisk * disk) del_gendisk() argument 733 invalidate_disk(struct gendisk * disk) invalidate_disk() argument 748 struct gendisk *disk = dev_to_disk(dev); disk_badblocks_show() local 760 struct gendisk *disk = dev_to_disk(dev); disk_badblocks_store() local 897 struct gendisk *disk = dev_to_disk(dev); disk_range_show() local 905 struct gendisk *disk = dev_to_disk(dev); disk_ext_range_show() local 914 struct gendisk *disk = dev_to_disk(dev); disk_removable_show() local 923 struct gendisk *disk = dev_to_disk(dev); disk_hidden_show() local 932 struct gendisk *disk = dev_to_disk(dev); disk_ro_show() local 1018 struct gendisk *disk = dev_to_disk(dev); disk_alignment_offset_show() local 1027 struct gendisk *disk = dev_to_disk(dev); disk_discard_alignment_show() local 1035 struct gendisk *disk = dev_to_disk(dev); diskseq_show() local 1119 struct gendisk *disk = dev_to_disk(dev); disk_visible() local 1158 struct gendisk *disk = dev_to_disk(dev); disk_release() local 1197 const struct gendisk *disk = dev_to_disk(dev); block_uevent() local 1210 struct gendisk *disk = dev_to_disk(dev); block_devnode() local 1319 part_devt(struct gendisk * disk,u8 partno) part_devt() argument 1336 struct gendisk *disk; __alloc_disk_node() local 1395 struct gendisk *disk; __blk_alloc_disk() local 1424 put_disk(struct gendisk * disk) put_disk() argument 1450 set_disk_ro(struct gendisk * disk,bool read_only) set_disk_ro() argument 1463 inc_diskseq(struct gendisk * disk) inc_diskseq() argument [all...] |
H A D | disk-events.c | 12 struct gendisk *disk; /* the associated disk */ member 41 static unsigned long disk_events_poll_jiffies(struct gendisk *disk) in disk_events_poll_jiffies() argument 43 struct disk_events *ev = disk->ev; in disk_events_poll_jiffies() 52 else if (disk->event_flags & DISK_EVENT_FLAG_POLL) in disk_events_poll_jiffies() 73 void disk_block_events(struct gendisk *disk) in disk_block_events() argument 75 struct disk_events *ev = disk->ev; in disk_block_events() 93 cancel_delayed_work_sync(&disk->ev->dwork); in disk_block_events() 98 static void __disk_unblock_events(struct gendisk *disk, bool check_now) in __disk_unblock_events() argument 100 struct disk_events *ev = disk->ev; in __disk_unblock_events() 112 intv = disk_events_poll_jiffies(disk); in __disk_unblock_events() [all …]
|
H A D | blk-zoned.c | 60 if (!rq->q->disk->seq_zones_wlock) in blk_req_needs_zone_write_lock() 71 if (test_and_set_bit(zno, rq->q->disk->seq_zones_wlock)) in blk_req_zone_write_trylock() 84 rq->q->disk->seq_zones_wlock))) in __blk_req_zone_write_lock() 95 if (rq->q->disk->seq_zones_wlock) in __blk_req_zone_write_unlock() 97 rq->q->disk->seq_zones_wlock)); in __blk_req_zone_write_unlock() 141 struct gendisk *disk = bdev->bd_disk; in blkdev_report_zones() local 142 sector_t capacity = get_capacity(disk); in blkdev_report_zones() 144 if (!bdev_is_zoned(bdev) || WARN_ON_ONCE(!disk->fops->report_zones)) in blkdev_report_zones() 150 return disk->fops->report_zones(disk, sector, nr_zones, cb, data); in blkdev_report_zones() 183 struct gendisk *disk = bdev->bd_disk; in blkdev_zone_reset_all_emulated() local [all …]
|
H A D | holder.c | 12 struct gendisk *disk) in bd_find_holder_disk() argument 16 list_for_each_entry(holder, &disk->slave_bdevs, list) in bd_find_holder_disk() 60 int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk) in bd_link_disk_holder() argument 65 if (WARN_ON_ONCE(!disk->slave_dir)) in bd_link_disk_holder() 68 if (bdev->bd_disk == disk) in bd_link_disk_holder() 83 mutex_lock(&disk->open_mutex); in bd_link_disk_holder() 86 holder = bd_find_holder_disk(bdev, disk); in bd_link_disk_holder() 103 ret = add_symlink(disk->slave_dir, bdev_kobj(bdev)); in bd_link_disk_holder() 106 ret = add_symlink(bdev->bd_holder_dir, &disk_to_dev(disk)->kobj); in bd_link_disk_holder() 109 list_add(&holder->list, &disk->slave_bdevs); in bd_link_disk_holder() [all …]
|
H A D | blk-ia-ranges.c | 108 int disk_register_independent_access_ranges(struct gendisk *disk) in disk_register_independent_access_ranges() argument 110 struct blk_independent_access_ranges *iars = disk->ia_ranges; in disk_register_independent_access_ranges() 111 struct request_queue *q = disk->queue; in disk_register_independent_access_ranges() 126 &disk->queue_kobj, "%s", in disk_register_independent_access_ranges() 129 disk->ia_ranges = NULL; in disk_register_independent_access_ranges() 152 void disk_unregister_independent_access_ranges(struct gendisk *disk) in disk_unregister_independent_access_ranges() argument 154 struct request_queue *q = disk->queue; in disk_unregister_independent_access_ranges() 155 struct blk_independent_access_ranges *iars = disk->ia_ranges; in disk_unregister_independent_access_ranges() 173 disk->ia_ranges = NULL; in disk_unregister_independent_access_ranges() 193 static bool disk_check_ia_ranges(struct gendisk *disk, in disk_check_ia_ranges() argument [all …]
|
H A D | blk-sysfs.c | 82 if (!q->disk) in queue_ra_show() 84 ra_kb = q->disk->bdi->ra_pages << (PAGE_SHIFT - 10); in queue_ra_show() 94 if (!q->disk) in queue_ra_store() 99 q->disk->bdi->ra_pages = ra_kb >> (PAGE_SHIFT - 10); in queue_ra_store() 254 if (q->disk) in queue_max_sectors_store() 255 q->disk->bdi->io_pages = max_sectors_kb >> (PAGE_SHIFT - 10); in queue_max_sectors_store() 324 return queue_var_show(disk_nr_zones(q->disk), page); in queue_nr_zones_show() 329 return queue_var_show(bdev_max_open_zones(q->disk->part0), page); in queue_max_open_zones_show() 334 return queue_var_show(bdev_max_active_zones(q->disk->part0), page); in queue_max_active_zones_show() 586 ret = wbt_init(q->disk); in queue_wb_lat_store() 676 struct gendisk *disk = container_of(kobj, struct gendisk, queue_kobj); queue_attr_visible() local 690 struct gendisk *disk = container_of(kobj, struct gendisk, queue_kobj); blk_mq_queue_attr_visible() local 718 struct gendisk *disk = container_of(kobj, struct gendisk, queue_kobj); queue_attr_show() local 735 struct gendisk *disk = container_of(kobj, struct gendisk, queue_kobj); queue_attr_store() local 770 blk_debugfs_remove(struct gendisk * disk) blk_debugfs_remove() argument 787 blk_register_queue(struct gendisk * disk) blk_register_queue() argument 872 blk_unregister_queue(struct gendisk * disk) blk_unregister_queue() argument [all...] |
/openbmc/linux/block/partitions/ |
H A D | core.c | 129 state->disk = hd; in check_partition() 299 static struct block_device *add_partition(struct gendisk *disk, int partno, in add_partition() argument 304 struct device *ddev = disk_to_dev(disk); in add_partition() 310 lockdep_assert_held(&disk->open_mutex); in add_partition() 319 switch (disk->queue->limits.zoned) { in add_partition() 322 disk->disk_name); in add_partition() 326 disk->disk_name); in add_partition() 327 disk_set_zoned(disk, BLK_ZONED_NONE); in add_partition() 333 if (xa_load(&disk->part_tbl, partno)) in add_partition() 337 get_device(disk_to_dev(disk)); in add_partition() [all …]
|
/openbmc/linux/drivers/md/ |
H A D | dm-zone.c | 25 struct gendisk *disk = md->disk; in dm_blk_do_report_zones() local 46 args.next_sector < get_capacity(disk)); in dm_blk_do_report_zones() 56 int dm_blk_report_zones(struct gendisk *disk, sector_t sector, in dm_blk_report_zones() argument 59 struct mapped_device *md = disk->private_data; in dm_blk_report_zones() 143 if (md->disk) { in dm_cleanup_zoned_dev() 144 bitmap_free(md->disk->conv_zones_bitmap); in dm_cleanup_zoned_dev() 145 md->disk->conv_zones_bitmap = NULL; in dm_cleanup_zoned_dev() 146 bitmap_free(md->disk->seq_zones_wlock); in dm_cleanup_zoned_dev() 147 md->disk->seq_zones_wlock = NULL; in dm_cleanup_zoned_dev() 181 struct gendisk *disk = md->disk; in dm_zone_revalidate_cb() local [all …]
|
H A D | dm-era-target.c | 203 struct superblock_disk *disk = dm_block_data(b); in sb_prepare_for_write() local 205 disk->blocknr = cpu_to_le64(dm_block_location(b)); in sb_prepare_for_write() 206 disk->csum = cpu_to_le32(dm_bm_checksum(&disk->flags, in sb_prepare_for_write() 211 static int check_metadata_version(struct superblock_disk *disk) in check_metadata_version() argument 213 uint32_t metadata_version = le32_to_cpu(disk->version); in check_metadata_version() 228 struct superblock_disk *disk = dm_block_data(b); in sb_check() local 231 if (dm_block_location(b) != le64_to_cpu(disk->blocknr)) { in sb_check() 233 __func__, le64_to_cpu(disk->blocknr), in sb_check() 238 if (le64_to_cpu(disk->magic) != SUPERBLOCK_MAGIC) { in sb_check() 240 __func__, le64_to_cpu(disk->magic), in sb_check() [all …]
|
/openbmc/qemu/tests/qemu-iotests/ |
H A D | 185.out | 12 'arguments': { 'device': 'disk', 20 'qemu-io disk "write 0 4M"' } } 25 'arguments': { 'device': 'disk', 35 'arguments': { 'device': 'disk', 39 …roseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}} 40 …roseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} 44 …croseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} 45 …roseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} 46 …croseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} 47 …roseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} [all …]
|
H A D | 242 | 32 disk = file_path('disk') variable 41 img_info_log(disk, extra_args=extra_args) 42 result = qemu_img_info('--force-share', disk) 54 vm = iotests.VM().add_drive(disk) 64 qemu_io_log('-c', write, disk) 68 with open(disk, "r+b") as f: 77 qemu_img_create('-f', iotests.imgfmt, disk, '1M') 89 vm = iotests.VM().add_drive(disk) 98 qemu_img_create('-f', iotests.imgfmt, disk, '1M') 103 img_info_log(disk, check=False) [all …]
|
/openbmc/linux/include/linux/ |
H A D | blkdev.h | 212 static inline bool disk_live(struct gendisk *disk) in disk_live() argument 214 return !inode_unhashed(disk->part0->bd_inode); in disk_live() 227 static inline unsigned int disk_openers(struct gendisk *disk) in disk_openers() argument 229 return atomic_read(&disk->part0->bd_openers); in disk_openers() 239 static inline bool disk_has_partscan(struct gendisk *disk) in disk_has_partscan() argument 241 return !(disk->flags & (GENHD_FL_NO_PART | GENHD_FL_HIDDEN)) && in disk_has_partscan() 242 !test_bit(GD_SUPPRESS_PART_SCAN, &disk->state); in disk_has_partscan() 251 #define disk_to_dev(disk) \ argument 252 (&((disk)->part0->bd_device)) 255 #define disk_to_cdi(disk) ((disk)->cdi) argument [all …]
|
/openbmc/linux/Documentation/admin-guide/ |
H A D | devices.txt | 20 1 block RAM disk 21 0 = /dev/ram0 First RAM disk 22 1 = /dev/ram1 Second RAM disk 24 250 = /dev/initrd Initial RAM disk 27 /dev/initrd refers to a RAM disk which was preloaded 115 3 block First MFM, RLL and IDE hard disk/CD-ROM interface 116 0 = /dev/hda Master: whole disk (or CD-ROM) 117 64 = /dev/hdb Slave: whole disk (or CD-ROM) 119 For partitions, add to the whole disk device number: 120 0 = /dev/hd? Whole disk [all …]
|
/openbmc/linux/drivers/block/ |
H A D | n64cart.c | 117 struct gendisk *disk; in n64cart_probe() local 134 disk = blk_alloc_disk(NUMA_NO_NODE); in n64cart_probe() 135 if (!disk) in n64cart_probe() 138 disk->first_minor = 0; in n64cart_probe() 139 disk->flags = GENHD_FL_NO_PART; in n64cart_probe() 140 disk->fops = &n64cart_fops; in n64cart_probe() 141 disk->private_data = &pdev->dev; in n64cart_probe() 142 strcpy(disk->disk_name, "n64cart"); in n64cart_probe() 144 set_capacity(disk, size >> SECTOR_SHIFT); in n64cart_probe() 145 set_disk_ro(disk, 1); in n64cart_probe() [all …]
|
H A D | z2ram.c | 143 static int z2_open(struct gendisk *disk, blk_mode_t mode) in z2_open() argument 145 int device = disk->first_minor; in z2_open() 291 static void z2_release(struct gendisk *disk) in z2_release() argument 318 struct gendisk *disk; in z2ram_register_disk() local 321 disk = blk_mq_alloc_disk(&tag_set, NULL); in z2ram_register_disk() 322 if (IS_ERR(disk)) in z2ram_register_disk() 323 return PTR_ERR(disk); in z2ram_register_disk() 325 disk->major = Z2RAM_MAJOR; in z2ram_register_disk() 326 disk->first_minor = minor; in z2ram_register_disk() 327 disk->minors = 1; in z2ram_register_disk() [all …]
|
/openbmc/linux/drivers/block/null_blk/ |
H A D | trace.h | 24 static inline void __assign_disk_name(char *name, struct gendisk *disk) in __assign_disk_name() argument 26 if (disk) in __assign_disk_name() 27 memcpy(name, disk->disk_name, DISK_NAME_LEN); in __assign_disk_name() 38 __array(char, disk, DISK_NAME_LEN) 47 __assign_disk_name(__entry->disk, cmd->rq->q->disk); 50 __print_disk_name(__entry->disk), 60 __array(char, disk, DISK_NAME_LEN) 65 __assign_disk_name(__entry->disk, nullb->disk); 68 __print_disk_name(__entry->disk), __entry->nr_zones)
|
/openbmc/linux/arch/m68k/emu/ |
H A D | nfblock.c | 57 struct gendisk *disk; member 120 dev->disk = blk_alloc_disk(NUMA_NO_NODE); in nfhd_init_one() 121 if (!dev->disk) in nfhd_init_one() 124 dev->disk->major = major_num; in nfhd_init_one() 125 dev->disk->first_minor = dev_id * 16; in nfhd_init_one() 126 dev->disk->minors = 16; in nfhd_init_one() 127 dev->disk->fops = &nfhd_ops; in nfhd_init_one() 128 dev->disk->private_data = dev; in nfhd_init_one() 129 sprintf(dev->disk->disk_name, "nfhd%u", dev_id); in nfhd_init_one() 130 set_capacity(dev->disk, (sector_t)blocks * (bsize / 512)); in nfhd_init_one() [all …]
|
/openbmc/qemu/docs/ |
H A D | block-replication.txt | 21 executes till the next checkpoint. To support disk contents checkpoint, 22 the modified disk contents in the Secondary VM must be buffered, and are 24 effort during a vmstate checkpoint, the disk modification operations of 25 the Primary disk are asynchronously forwarded to the Secondary node. 51 2) Before Primary write requests are written to Secondary disk, the 52 original sector content will be read from Secondary disk and 56 3) Primary write requests will be written to Secondary disk. 71 disk ^ 7 Quorum 77 Primary | || Secondary disk <--------- hidden-disk 5 <--------- active-disk 4 84 1) The disk on the primary is represented by a block device with two [all …]
|
/openbmc/linux/drivers/scsi/ |
H A D | sr.c | 141 static inline struct scsi_cd *scsi_cd(struct gendisk *disk) in scsi_cd() argument 143 return disk->private_data; in scsi_cd() 302 struct scsi_cd *cd = scsi_cd(rq->q->disk); in sr_done() 342 if (error_sector < get_capacity(cd->disk) && in sr_done() 344 set_capacity(cd->disk, error_sector); in sr_done() 369 cd = scsi_cd(rq->q->disk); in sr_init_command() 487 static int sr_block_open(struct gendisk *disk, blk_mode_t mode) in sr_block_open() argument 489 struct scsi_cd *cd = scsi_cd(disk); in sr_block_open() 497 if (disk_check_media_change(disk)) in sr_block_open() 510 static void sr_block_release(struct gendisk *disk) in sr_block_release() argument [all …]
|
/openbmc/linux/drivers/nvme/host/ |
H A D | multipath.c | 62 if (h->disk) in nvme_mpath_unfreeze() 63 blk_mq_unfreeze_queue(h->disk->queue); in nvme_mpath_unfreeze() 72 if (h->disk) in nvme_mpath_wait_freeze() 73 blk_mq_freeze_queue_wait(h->disk->queue); in nvme_mpath_wait_freeze() 82 if (h->disk) in nvme_mpath_start_freeze() 83 blk_freeze_queue_start(h->disk->queue); in nvme_mpath_start_freeze() 107 bio_set_dev(bio, ns->head->disk->part0); in nvme_failover_req() 132 struct gendisk *disk = ns->head->disk; in nvme_mpath_start_request() local 139 if (!blk_queue_io_stat(disk->queue) || blk_rq_is_passthrough(rq)) in nvme_mpath_start_request() 143 nvme_req(rq)->start_time = bdev_start_io_acct(disk->part0, req_op(rq), in nvme_mpath_start_request() [all …]
|
H A D | trace.h | 38 static inline void __assign_disk_name(char *name, struct gendisk *disk) in __assign_disk_name() argument 40 if (disk) in __assign_disk_name() 41 memcpy(name, disk->disk_name, DISK_NAME_LEN); in __assign_disk_name() 51 __array(char, disk, DISK_NAME_LEN) 71 __assign_disk_name(__entry->disk, req->q->disk); 76 __entry->ctrl_id, __print_disk_name(__entry->disk), 89 __array(char, disk, DISK_NAME_LEN) 106 __assign_disk_name(__entry->disk, req->q->disk); 109 __entry->ctrl_id, __print_disk_name(__entry->disk), 146 __array(char, disk, DISK_NAME_LEN) [all …]
|
/openbmc/linux/Documentation/ABI/testing/ |
H A D | sysfs-fs-f2fs | 1 What: /sys/fs/f2fs/<disk>/gc_max_sleep_time 7 What: /sys/fs/f2fs/<disk>/gc_min_sleep_time 13 What: /sys/fs/f2fs/<disk>/gc_no_gc_sleep_time 19 What: /sys/fs/f2fs/<disk>/gc_idle 31 What: /sys/fs/f2fs/<disk>/reclaim_segments 41 What: /sys/fs/f2fs/<disk>/main_blkaddr 46 What: /sys/fs/f2fs/<disk>/ipu_policy 72 What: /sys/fs/f2fs/<disk>/min_ipu_util 78 What: /sys/fs/f2fs/<disk>/min_fsync_blocks 84 What: /sys/fs/f2fs/<disk>/min_seq_blocks [all …]
|
/openbmc/linux/drivers/md/bcache/ |
H A D | writeback.c | 32 struct cache_set *c = dc->disk.c; in __calc_target_rate() 84 int64_t dirty = bcache_dev_sectors_dirty(&dc->disk); in __update_writeback_rate() 101 struct cache_set *c = dc->disk.c; in __update_writeback_rate() 247 struct cache_set *c = dc->disk.c; in update_writeback_rate() 253 set_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate() 261 if (!test_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags) || in update_writeback_rate() 263 clear_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate() 297 if (test_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags) && in update_writeback_rate() 307 clear_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate() 315 if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) || in writeback_delay() [all …]
|
/openbmc/qemu/docs/system/ |
H A D | images.rst | 6 QEMU supports many disk image formats, including growable disk images 8 encrypted disk images. 12 Quick start for disk image creation 15 You can create a disk image with the command:: 19 where myimage.img is the disk image filename and mysize is its size in 30 If you use the option ``-snapshot``, all disk images are considered as 33 disk images by using the ``commit`` monitor command (or C-a s in the 44 writable block device using the ``qcow2`` disk image format. Normally 64 ``info snapshots``) and a snapshot of every writable disk image. The VM 66 block device. The disk image snapshots are stored in every disk image. [all …]
|
/openbmc/openbmc/poky/meta/files/ |
H A D | device_table-minimal.txt | 14 /dev/hda b 660 root disk 3 0 - - - 15 /dev/hda b 660 root disk 3 1 1 1 4 19 /dev/mmcblk0 b 660 root disk 179 0 - - - 20 /dev/mmcblk0p b 660 root disk 179 1 1 1 4 21 /dev/mtd c 660 root disk 90 0 0 2 8 27 /dev/sda b 660 root disk 8 0 - - - 28 /dev/sda b 660 root disk 8 1 1 1 4 29 /dev/sdb b 660 root disk 8 16 - - - 30 /dev/sdb b 660 root disk 8 17 1 1 4
|