/linux-6.1.9/drivers/block/paride/ |
D | pd.c | 247 enum action (*func)(struct pd_unit *disk); 259 static inline int status_reg(struct pd_unit *disk) in status_reg() argument 261 return pi_read_regr(disk->pi, 1, 6); in status_reg() 264 static inline int read_reg(struct pd_unit *disk, int reg) in read_reg() argument 266 return pi_read_regr(disk->pi, 0, reg); in read_reg() 269 static inline void write_status(struct pd_unit *disk, int val) in write_status() argument 271 pi_write_regr(disk->pi, 1, 6, val); in write_status() 274 static inline void write_reg(struct pd_unit *disk, int reg, int val) in write_reg() argument 276 pi_write_regr(disk->pi, 0, reg, val); in write_reg() 279 static inline u8 DRIVE(struct pd_unit *disk) in DRIVE() argument [all …]
|
/linux-6.1.9/block/ |
D | genhd.c | 58 void set_capacity(struct gendisk *disk, sector_t sectors) in set_capacity() argument 60 struct block_device *bdev = disk->part0; in set_capacity() 73 bool set_capacity_and_notify(struct gendisk *disk, sector_t size) in set_capacity_and_notify() argument 75 sector_t capacity = get_capacity(disk); in set_capacity_and_notify() 78 set_capacity(disk, size); in set_capacity_and_notify() 86 !disk_live(disk) || in set_capacity_and_notify() 87 (disk->flags & GENHD_FL_HIDDEN)) in set_capacity_and_notify() 91 disk->disk_name, capacity, size); in set_capacity_and_notify() 99 kobject_uevent_env(&disk_to_dev(disk)->kobj, KOBJ_CHANGE, envp); in set_capacity_and_notify() 338 void disk_uevent(struct gendisk *disk, enum kobject_action action) in disk_uevent() argument [all …]
|
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 …]
|
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() 32 static int __link_disk_holder(struct block_device *bdev, struct gendisk *disk) in __link_disk_holder() argument 36 ret = add_symlink(disk->slave_dir, bdev_kobj(bdev)); in __link_disk_holder() 39 ret = add_symlink(bdev->bd_holder_dir, &disk_to_dev(disk)->kobj); in __link_disk_holder() 41 del_symlink(disk->slave_dir, bdev_kobj(bdev)); in __link_disk_holder() 73 int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk) in bd_link_disk_holder() argument 78 mutex_lock(&disk->open_mutex); in bd_link_disk_holder() 82 holder = bd_find_holder_disk(bdev, disk); in bd_link_disk_holder() 97 if (disk->slave_dir) { in bd_link_disk_holder() [all …]
|
D | blk-zoned.c | 63 if (!rq->q->disk->seq_zones_wlock) in blk_req_needs_zone_write_lock() 66 if (bdev_op_is_zoned_write(rq->q->disk->part0, req_op(rq))) in blk_req_needs_zone_write_lock() 77 if (test_and_set_bit(zno, rq->q->disk->seq_zones_wlock)) in blk_req_zone_write_trylock() 90 rq->q->disk->seq_zones_wlock))) in __blk_req_zone_write_lock() 101 if (rq->q->disk->seq_zones_wlock) in __blk_req_zone_write_unlock() 103 rq->q->disk->seq_zones_wlock)); in __blk_req_zone_write_unlock() 147 struct gendisk *disk = bdev->bd_disk; in blkdev_report_zones() local 148 sector_t capacity = get_capacity(disk); in blkdev_report_zones() 150 if (!bdev_is_zoned(bdev) || WARN_ON_ONCE(!disk->fops->report_zones)) in blkdev_report_zones() 156 return disk->fops->report_zones(disk, sector, nr_zones, cb, data); in blkdev_report_zones() [all …]
|
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() 128 disk->ia_ranges = NULL; in disk_register_independent_access_ranges() 151 void disk_unregister_independent_access_ranges(struct gendisk *disk) in disk_unregister_independent_access_ranges() argument 153 struct request_queue *q = disk->queue; in disk_unregister_independent_access_ranges() 154 struct blk_independent_access_ranges *iars = disk->ia_ranges; in disk_unregister_independent_access_ranges() 172 disk->ia_ranges = NULL; in disk_unregister_independent_access_ranges() 192 static bool disk_check_ia_ranges(struct gendisk *disk, in disk_check_ia_ranges() argument 196 sector_t capacity = get_capacity(disk); in disk_check_ia_ranges() [all …]
|
D | blk.h | 215 int blk_integrity_add(struct gendisk *disk); 249 static inline int blk_integrity_add(struct gendisk *disk) in blk_integrity_add() argument 253 static inline void blk_integrity_del(struct gendisk *disk) in blk_integrity_del() argument 399 int blk_iolatency_init(struct gendisk *disk); 401 static inline int blk_iolatency_init(struct gendisk *disk) { return 0; }; in blk_iolatency_init() argument 405 void disk_free_zone_bitmaps(struct gendisk *disk); 406 void disk_clear_zone_settings(struct gendisk *disk); 408 static inline void disk_free_zone_bitmaps(struct gendisk *disk) {} in disk_free_zone_bitmaps() argument 409 static inline void disk_clear_zone_settings(struct gendisk *disk) {} in disk_clear_zone_settings() argument 417 int bdev_add_partition(struct gendisk *disk, int partno, sector_t start, [all …]
|
D | blk-integrity.c | 224 struct gendisk *disk = container_of(kobj, struct gendisk, integrity_kobj); in integrity_attr_show() local 225 struct blk_integrity *bi = &disk->queue->integrity; in integrity_attr_show() 236 struct gendisk *disk = container_of(kobj, struct gendisk, integrity_kobj); in integrity_attr_store() local 237 struct blk_integrity *bi = &disk->queue->integrity; in integrity_attr_store() 397 void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) in blk_integrity_register() argument 399 struct blk_integrity *bi = &disk->queue->integrity; in blk_integrity_register() 404 ilog2(queue_logical_block_size(disk->queue)); in blk_integrity_register() 409 blk_queue_flag_set(QUEUE_FLAG_STABLE_WRITES, disk->queue); in blk_integrity_register() 412 if (disk->queue->crypto_profile) { in blk_integrity_register() 414 disk->queue->crypto_profile = NULL; in blk_integrity_register() [all …]
|
D | blk-throttle.h | 171 static inline int blk_throtl_init(struct gendisk *disk) { return 0; } in blk_throtl_init() argument 172 static inline void blk_throtl_exit(struct gendisk *disk) { } in blk_throtl_exit() argument 173 static inline void blk_throtl_register(struct gendisk *disk) { } in blk_throtl_register() argument 175 static inline void blk_throtl_cancel_bios(struct gendisk *disk) { } in blk_throtl_cancel_bios() argument 177 int blk_throtl_init(struct gendisk *disk); 178 void blk_throtl_exit(struct gendisk *disk); 179 void blk_throtl_register(struct gendisk *disk); 181 void blk_throtl_cancel_bios(struct gendisk *disk);
|
/linux-6.1.9/block/partitions/ |
D | core.c | 137 state->disk = hd; in check_partition() 305 static struct block_device *add_partition(struct gendisk *disk, int partno, in add_partition() argument 310 struct device *ddev = disk_to_dev(disk); in add_partition() 316 lockdep_assert_held(&disk->open_mutex); in add_partition() 325 switch (disk->queue->limits.zoned) { in add_partition() 328 disk->disk_name); in add_partition() 332 disk->disk_name); in add_partition() 333 disk_set_zoned(disk, BLK_ZONED_NONE); in add_partition() 339 if (xa_load(&disk->part_tbl, partno)) in add_partition() 343 get_device(disk_to_dev(disk)); in add_partition() [all …]
|
/linux-6.1.9/drivers/md/ |
D | dm-zone.c | 24 struct gendisk *disk = md->disk; in dm_blk_do_report_zones() local 45 args.next_sector < get_capacity(disk)); in dm_blk_do_report_zones() 55 int dm_blk_report_zones(struct gendisk *disk, sector_t sector, in dm_blk_report_zones() argument 58 struct mapped_device *md = disk->private_data; in dm_blk_report_zones() 142 if (md->disk) { in dm_cleanup_zoned_dev() 143 kfree(md->disk->conv_zones_bitmap); in dm_cleanup_zoned_dev() 144 md->disk->conv_zones_bitmap = NULL; in dm_cleanup_zoned_dev() 145 kfree(md->disk->seq_zones_wlock); in dm_cleanup_zoned_dev() 146 md->disk->seq_zones_wlock = NULL; in dm_cleanup_zoned_dev() 180 struct gendisk *disk = md->disk; in dm_zone_revalidate_cb() local [all …]
|
D | dm-era-target.c | 196 struct superblock_disk *disk = dm_block_data(b); in sb_prepare_for_write() local 198 disk->blocknr = cpu_to_le64(dm_block_location(b)); in sb_prepare_for_write() 199 disk->csum = cpu_to_le32(dm_bm_checksum(&disk->flags, in sb_prepare_for_write() 204 static int check_metadata_version(struct superblock_disk *disk) in check_metadata_version() argument 206 uint32_t metadata_version = le32_to_cpu(disk->version); in check_metadata_version() 220 struct superblock_disk *disk = dm_block_data(b); in sb_check() local 223 if (dm_block_location(b) != le64_to_cpu(disk->blocknr)) { in sb_check() 225 le64_to_cpu(disk->blocknr), in sb_check() 230 if (le64_to_cpu(disk->magic) != SUPERBLOCK_MAGIC) { in sb_check() 232 le64_to_cpu(disk->magic), in sb_check() [all …]
|
/linux-6.1.9/drivers/block/ |
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 …]
|
D | z2ram.c | 293 static void z2_release(struct gendisk *disk, fmode_t mode) in z2_release() argument 320 struct gendisk *disk; in z2ram_register_disk() local 323 disk = blk_mq_alloc_disk(&tag_set, NULL); in z2ram_register_disk() 324 if (IS_ERR(disk)) in z2ram_register_disk() 325 return PTR_ERR(disk); in z2ram_register_disk() 327 disk->major = Z2RAM_MAJOR; in z2ram_register_disk() 328 disk->first_minor = minor; in z2ram_register_disk() 329 disk->minors = 1; in z2ram_register_disk() 330 disk->flags |= GENHD_FL_NO_PART; in z2ram_register_disk() 331 disk->fops = &z2_fops; in z2ram_register_disk() [all …]
|
D | nbd.c | 122 struct gendisk *disk; member 158 #define nbd_name(nbd) ((nbd)->disk->disk_name) 176 return disk_to_dev(nbd->disk); in nbd_to_dev() 223 struct gendisk *disk = dev_to_disk(dev); in pid_show() local 224 struct nbd_device *nbd = (struct nbd_device *)disk->private_data; in pid_show() 237 struct gendisk *disk = dev_to_disk(dev); in backend_show() local 238 struct nbd_device *nbd = (struct nbd_device *)disk->private_data; in backend_show() 250 struct gendisk *disk = nbd->disk; in nbd_dev_remove() local 252 del_gendisk(disk); in nbd_dev_remove() 253 put_disk(disk); in nbd_dev_remove() [all …]
|
/linux-6.1.9/include/linux/ |
D | blkdev.h | 207 static inline bool disk_live(struct gendisk *disk) in disk_live() argument 209 return !inode_unhashed(disk->part0->bd_inode); in disk_live() 222 static inline unsigned int disk_openers(struct gendisk *disk) in disk_openers() argument 224 return atomic_read(&disk->part0->bd_openers); in disk_openers() 233 #define disk_to_dev(disk) \ argument 234 (&((disk)->part0->bd_device)) 237 #define disk_to_cdi(disk) ((disk)->cdi) argument 239 #define disk_to_cdi(disk) NULL argument 242 static inline dev_t disk_devt(struct gendisk *disk) in disk_devt() argument 244 return MKDEV(disk->major, disk->first_minor); in disk_devt() [all …]
|
/linux-6.1.9/Documentation/admin-guide/ |
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 …]
|
/linux-6.1.9/drivers/block/null_blk/ |
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)
|
/linux-6.1.9/arch/m68k/emu/ |
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 …]
|
/linux-6.1.9/Documentation/ABI/testing/ |
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 65 What: /sys/fs/f2fs/<disk>/min_ipu_util 71 What: /sys/fs/f2fs/<disk>/min_fsync_blocks 77 What: /sys/fs/f2fs/<disk>/min_seq_blocks [all …]
|
/linux-6.1.9/drivers/md/bcache/ |
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 …]
|
/linux-6.1.9/drivers/nvme/host/ |
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), 149 __array(char, disk, DISK_NAME_LEN) [all …]
|
D | multipath.c | 59 if (h->disk) in nvme_mpath_unfreeze() 60 blk_mq_unfreeze_queue(h->disk->queue); in nvme_mpath_unfreeze() 69 if (h->disk) in nvme_mpath_wait_freeze() 70 blk_mq_freeze_queue_wait(h->disk->queue); in nvme_mpath_wait_freeze() 79 if (h->disk) in nvme_mpath_start_freeze() 80 blk_freeze_queue_start(h->disk->queue); in nvme_mpath_start_freeze() 104 bio_set_dev(bio, ns->head->disk->part0); in nvme_failover_req() 123 if (!ns->head->disk) in nvme_kick_requeue_lists() 127 disk_uevent(ns->head->disk, KOBJ_CHANGE); in nvme_kick_requeue_lists() 175 sector_t capacity = get_capacity(head->disk); in nvme_mpath_revalidate_paths() [all …]
|
/linux-6.1.9/drivers/scsi/ |
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() 299 struct scsi_cd *cd = scsi_cd(rq->q->disk); in sr_done() 339 if (error_sector < get_capacity(cd->disk) && in sr_done() 341 set_capacity(cd->disk, error_sector); in sr_done() 366 cd = scsi_cd(rq->q->disk); in sr_init_command() 507 static void sr_block_release(struct gendisk *disk, fmode_t mode) in sr_block_release() argument 509 struct scsi_cd *cd = scsi_cd(disk); in sr_block_release() 552 static unsigned int sr_block_check_events(struct gendisk *disk, in sr_block_check_events() argument 555 struct scsi_cd *cd = disk->private_data; in sr_block_check_events() [all …]
|
/linux-6.1.9/Documentation/admin-guide/blockdev/ |
D | ramdisk.rst | 2 Using the RAM disk block device with Linux 16 The RAM disk driver is a way to use main system memory as a block device. It 22 The RAM disk dynamically grows as more space is required. It does this by using 26 The RAM disk supports up to 16 RAM disks by default, and can be reconfigured 31 To use RAM disk support with your system, run './MAKEDEV ram' from the /dev 35 The new RAM disk also has the ability to load compressed RAM disk images, 37 rescue floppy disk. 48 This parameter tells the RAM disk driver to set up RAM disks of N k size. The 80 If you make a boot disk that has LILO, then for the above, you would use:: 87 To create a RAM disk image, you will need a spare block device to [all …]
|