| /kernel/linux/linux-5.10/drivers/block/paride/ |
| D | pd.c | 233 int changed; /* Have we seen a disk change ? */ 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() [all …]
|
| /kernel/linux/linux-6.6/block/ |
| 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)->kobj, KOBJ_CHANGE, envp); in set_capacity_and_notify() [all …]
|
| D | disk-events.c | 3 * Disk events - monitor disk events like media change and eject request. 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() 59 * disk_block_events - block and flush disk event checking 60 * @disk: disk to block events for 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() [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() 33 * bd_link_disk_holder - create symlinks between holding disk and slave bdev 35 * @disk: the holding disk 41 * - from "slaves" directory of the holder @disk to the claimed @bdev 42 * - from "holders" directory of the @bdev to the holder @disk 44 * For example, if /dev/dm-0 maps to /dev/sda and disk for dm-0 is 51 * ensure that both @bdev and @disk are valid during the creation and 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() [all …]
|
| 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 …]
|
| D | blk-ia-ranges.c | 104 * @disk: Target disk 106 * Register with sysfs a set of independent access ranges for @disk. 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() [all …]
|
| /kernel/linux/linux-5.10/block/ |
| D | genhd.c | 43 static void disk_alloc_events(struct gendisk *disk); 44 static void disk_add_events(struct gendisk *disk); 45 static void disk_del_events(struct gendisk *disk); 46 static void disk_release_events(struct gendisk *disk); 49 * Set disk capacity and notify if the size is not currently 52 bool set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size, in set_capacity_revalidate_and_notify() argument 55 sector_t capacity = get_capacity(disk); in set_capacity_revalidate_and_notify() 57 set_capacity(disk, size); in set_capacity_revalidate_and_notify() 59 revalidate_disk_size(disk, true); in set_capacity_revalidate_and_notify() 64 kobject_uevent_env(&disk_to_dev(disk)->kobj, KOBJ_CHANGE, envp); in set_capacity_revalidate_and_notify() [all …]
|
| /kernel/liteos_a/drivers/block/disk/src/ |
| D | disk.c | 32 #include "disk.h" 105 los_disk *disk = NULL; in los_alloc_diskid_byname() local 122 disk = get_disk(diskID); in los_alloc_diskid_byname() 123 if ((disk != NULL) && (disk->disk_status == STAT_UNUSED)) { in los_alloc_diskid_byname() 124 disk->disk_status = STAT_UNREADY; in los_alloc_diskid_byname() 131 if ((disk == NULL) || (diskID == SYS_MAX_DISK)) { in los_alloc_diskid_byname() 136 if (disk->disk_name != NULL) { in los_alloc_diskid_byname() 137 LOS_MemFree(m_aucSysMem0, disk->disk_name); in los_alloc_diskid_byname() 138 disk->disk_name = NULL; in los_alloc_diskid_byname() 141 disk->disk_name = LOS_MemAlloc(m_aucSysMem0, (nameLen + 1)); in los_alloc_diskid_byname() [all …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-6.6/block/partitions/ |
| D | core.c | 17 * Probe partition formats with tables at disk address 0 32 * disk address 0xdc0. Since these may also have stale 129 state->disk = hd; in check_partition() 296 * Must be called either with open_mutex held, before a disk can be opened or 297 * after all disk users are gone. 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() [all …]
|
| /kernel/liteos_a/drivers/block/disk/include/ |
| D | disk.h | 33 * @defgroup disk Disk 177 UINT32 disk_id : 8; /* physics disk number */ 178 UINT32 disk_status : 2; /* status of disk */ 183 OsBcache *bcache; /* cache of the disk, shared in all partitions */ 185 UINT32 sector_size; /* disk sector size */ 186 UINT64 sector_start; /* disk start sector */ 187 UINT64 sector_count; /* disk sector number */ 198 UINT32 disk_id : 8; /* physics disk number */ 200 UINT32 part_no_disk : 8; /* partition number in the disk */ 236 * @ingroup disk [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | genhd.h | 7 * Generic hard disk header file by 24 #define disk_to_dev(disk) (&(disk)->part0.__dev) argument 214 #define disk_to_cdi(disk) ((disk)->cdi) argument 216 #define disk_to_cdi(disk) NULL argument 230 static inline int disk_max_parts(struct gendisk *disk) in disk_max_parts() argument 232 if (disk->flags & GENHD_FL_EXT_DEVT) in disk_max_parts() 234 return disk->minors; in disk_max_parts() 237 static inline bool disk_part_scan_enabled(struct gendisk *disk) in disk_part_scan_enabled() argument 239 return disk_max_parts(disk) > 1 && in disk_part_scan_enabled() 240 !(disk->flags & GENHD_FL_NO_PART_SCAN); in disk_part_scan_enabled() [all …]
|
| /kernel/linux/linux-5.10/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 47 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 …]
|
| D | sysfs-block | 1 What: /sys/block/<disk>/stat 5 The /sys/block/<disk>/stat files displays the I/O 6 statistics of disk <disk>. They contain 11 fields: 31 What: /sys/block/<disk>/<part>/stat 35 The /sys/block/<disk>/<part>/stat files display the 37 same as the above-written /sys/block/<disk>/stat 41 What: /sys/block/<disk>/integrity/format 49 What: /sys/block/<disk>/integrity/read_verify 58 What: /sys/block/<disk>/integrity/tag_size 66 What: /sys/block/<disk>/integrity/device_is_integrity_capable [all …]
|
| D | sysfs-block-bcache | 1 What: /sys/block/<disk>/bcache/unregister 11 What: /sys/block/<disk>/bcache/clear_stats 17 What: /sys/block/<disk>/bcache/cache 24 What: /sys/block/<disk>/bcache/cache_hits 31 What: /sys/block/<disk>/bcache/cache_misses 37 What: /sys/block/<disk>/bcache/cache_hit_ratio 43 What: /sys/block/<disk>/bcache/sequential_cutoff 51 What: /sys/block/<disk>/bcache/bypassed 59 What: /sys/block/<disk>/bcache/writeback 68 What: /sys/block/<disk>/bcache/writeback_running [all …]
|
| /kernel/linux/linux-6.6/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 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 …]
|
| D | sysfs-block-bcache | 1 What: /sys/block/<disk>/bcache/unregister 11 What: /sys/block/<disk>/bcache/clear_stats 17 What: /sys/block/<disk>/bcache/cache 24 What: /sys/block/<disk>/bcache/cache_hits 31 What: /sys/block/<disk>/bcache/cache_misses 37 What: /sys/block/<disk>/bcache/cache_hit_ratio 43 What: /sys/block/<disk>/bcache/sequential_cutoff 51 What: /sys/block/<disk>/bcache/bypassed 59 What: /sys/block/<disk>/bcache/writeback 68 What: /sys/block/<disk>/bcache/writeback_running [all …]
|
| /kernel/linux/linux-6.6/Documentation/ABI/stable/ |
| D | sysfs-block | 1 What: /sys/block/<disk>/alignment_offset 10 offset from the disk's natural alignment. 13 What: /sys/block/<disk>/discard_alignment 25 What: /sys/block/<disk>/diskseq 29 The /sys/block/<disk>/diskseq files reports the disk 37 What: /sys/block/<disk>/inflight 49 This is related to /sys/block/<disk>/queue/nr_requests 53 What: /sys/block/<disk>/integrity/device_is_integrity_capable 61 What: /sys/block/<disk>/integrity/format 69 What: /sys/block/<disk>/integrity/protection_interval_bytes [all …]
|
| /kernel/linux/linux-5.10/block/partitions/ |
| D | core.c | 17 * Probe partition formats with tables at disk address 0 32 * disk address 0xdc0. Since these may also have stale 287 struct gendisk *disk = part_to_disk(part); in hd_struct_free_work() local 290 * Release the disk reference acquired in delete_partition here. in hd_struct_free_work() 295 put_device(disk_to_dev(disk)); in hd_struct_free_work() 306 struct gendisk *disk = part_to_disk(part); in hd_struct_free() local 308 rcu_dereference_protected(disk->part_tbl, 1); in hd_struct_free() 324 * Must be called either with bd_mutex held, before a disk can be opened or 325 * after all disk users are gone. 329 struct gendisk *disk = part_to_disk(part); in delete_partition() local [all …]
|
| /kernel/linux/linux-6.6/Documentation/admin-guide/blockdev/ |
| D | ramdisk.rst | 2 Using the RAM disk block device with Linux 10 4) An Example of Creating a Compressed RAM Disk 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:: [all …]
|
| /kernel/linux/linux-5.10/Documentation/admin-guide/blockdev/ |
| D | ramdisk.rst | 2 Using the RAM disk block device with Linux 10 4) An Example of Creating a Compressed RAM Disk 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:: [all …]
|
| /kernel/linux/linux-6.6/drivers/md/ |
| 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 …]
|
| /kernel/linux/linux-6.6/Documentation/driver-api/md/ |
| D | raid5-cache.rst | 5 Raid 4/5/6 could include an extra disk for data cache besides normal RAID 6 disks. The role of RAID disks isn't changed with the cache disk. The cache disk 19 In both modes, all writes to the array will hit cache disk first. This means 20 the cache disk must be fast and sustainable. 34 The write-through cache will cache all data on cache disk first. After the data 35 is safe on the cache disk, the data will be flushed onto RAID disks. The 40 filesystems) after the data is safe on RAID disks, so cache disk failure 41 doesn't cause data loss. Of course cache disk failure means the array is 44 In write-through mode, the cache disk isn't required to be big. Several 51 cached on cache disk. But the main goal of 'write-back' cache is to speed up [all …]
|
| /kernel/linux/linux-5.10/Documentation/driver-api/md/ |
| D | raid5-cache.rst | 5 Raid 4/5/6 could include an extra disk for data cache besides normal RAID 6 disks. The role of RAID disks isn't changed with the cache disk. The cache disk 19 In both modes, all writes to the array will hit cache disk first. This means 20 the cache disk must be fast and sustainable. 34 The write-through cache will cache all data on cache disk first. After the data 35 is safe on the cache disk, the data will be flushed onto RAID disks. The 40 filesystems) after the data is safe on RAID disks, so cache disk failure 41 doesn't cause data loss. Of course cache disk failure means the array is 44 In write-through mode, the cache disk isn't required to be big. Several 51 cached on cache disk. But the main goal of 'write-back' cache is to speed up [all …]
|