Home
last modified time | relevance | path

Searched full:disk (Results 1 – 25 of 1599) sorted by relevance

12345678910>>...64

/linux-6.8/block/
Dgenhd.c59 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 …]
Ddisk-events.c3 * 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 …]
Dholder.c12 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 …]
Dblk-zoned.c60 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 …]
Dblk-ia-ranges.c104 * @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 …]
Dblk-sysfs.c82 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()
319 return queue_var_show(disk_nr_zones(q->disk), page); in queue_nr_zones_show()
324 return queue_var_show(bdev_max_open_zones(q->disk->part0), page); in queue_max_open_zones_show()
329 return queue_var_show(bdev_max_active_zones(q->disk->part0), page); in queue_max_active_zones_show()
581 ret = wbt_init(q->disk); in queue_wb_lat_store()
[all …]
/linux-6.8/Documentation/admin-guide/
Ddevices.txt20 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.8/block/partitions/
Dcore.c17 * 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()
285 * Must be called either with open_mutex held, before a disk can be opened or
286 * after all disk users are gone.
288 static struct block_device *add_partition(struct gendisk *disk, int partno, in add_partition() argument
293 struct device *ddev = disk_to_dev(disk); in add_partition()
299 lockdep_assert_held(&disk->open_mutex); in add_partition()
308 if (bdev_is_zoned(disk->part0)) { in add_partition()
310 disk->disk_name); in add_partition()
[all …]
Defi.c20 * - check for first/last_usable_lba outside of size of disk
26 * - On-disk structure and copy in memory is *always* LE now -
41 * thing that keeps EFI GUIDs on disk.
61 * sector of an odd-sized disk from user space. No tools have ever
127 * @disk: block device
131 * the part[0] entry for this disk, and is the number of
132 * physical sectors available on the disk.
134 static u64 last_lba(struct gendisk *disk) in last_lba() argument
136 return div_u64(bdev_nr_bytes(disk->part0), in last_lba()
137 queue_logical_block_size(disk->queue)) - 1ULL; in last_lba()
[all …]
/linux-6.8/Documentation/ABI/testing/
Dsysfs-fs-f2fs1 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 …]
Dsysfs-block-bcache1 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 …]
Dsysfs-fs-ext41 What: /sys/fs/ext4/<disk>/mb_stats
10 What: /sys/fs/ext4/<disk>/mb_group_prealloc
18 What: /sys/fs/ext4/<disk>/mb_max_to_scan
25 What: /sys/fs/ext4/<disk>/mb_min_to_scan
32 What: /sys/fs/ext4/<disk>/mb_order2_req
40 What: /sys/fs/ext4/<disk>/mb_stream_req
51 What: /sys/fs/ext4/<disk>/inode_readahead_blks
59 What: /sys/fs/ext4/<disk>/delayed_allocation_blocks
67 What: /sys/fs/ext4/<disk>/lifetime_write_kbytes
75 What: /sys/fs/ext4/<disk>/session_write_kbytes
[all …]
/linux-6.8/Documentation/ABI/stable/
Dsysfs-block1 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 …]
/linux-6.8/Documentation/admin-guide/blockdev/
Dramdisk.rst2 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 …]
/linux-6.8/drivers/md/
Ddm-zone.c25 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 …]
/linux-6.8/Documentation/driver-api/md/
Draid5-cache.rst5 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 …]
/linux-6.8/drivers/block/
Dn64cart.c117 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 …]
Dataflop.c12 * - Disk change detection and drive deselecting after motor-off
14 * - Autodetection of disk format (DD/HD); untested yet, because I
33 * the FDC will otherwise wait forever when no disk is inserted...
37 * - more/other disk formats
42 * - Make disk format numbering independent from minors
48 * - disk formatting
61 * - Maybe a better strategy for disk change detection (does anyone
168 /* Disk types: DD, HD, ED */
179 { "D820", 10,1640, 0, 0}, /* 3: DD disk with 82 tracks/10 sectors */
227 /* Array for translating minors into disk formats */
[all …]
/linux-6.8/include/linux/
Dblkdev.h214 static inline bool disk_live(struct gendisk *disk) in disk_live() argument
216 return !inode_unhashed(disk->part0->bd_inode); in disk_live()
220 * disk_openers - returns how many openers are there for a disk
221 * @disk: disk to check
223 * This returns the number of openers for a disk. Note that this value is only
224 * stable if disk->open_mutex is held.
229 static inline unsigned int disk_openers(struct gendisk *disk) in disk_openers() argument
231 return atomic_read(&disk->part0->bd_openers); in disk_openers()
240 #define disk_to_dev(disk) \ argument
241 (&((disk)->part0->bd_device))
[all …]
/linux-6.8/Documentation/power/
Dswsusp.rst11 If you touch anything on disk between suspend and resume...
20 problems. If your disk driver does not support suspend... (IDE does),
45 echo shutdown > /sys/power/disk; echo disk > /sys/power/state
49 echo platform > /sys/power/disk; echo disk > /sys/power/state
54 echo suspend > /sys/power/disk; echo disk > /sys/power/state
57 support. For suspend and resume to work, make sure your disk drivers
59 suspend/resume with modular disk drivers, see FAQ, but you probably
123 echo 4 > /proc/acpi/sleep # for suspend to disk
128 echo 4b > /proc/acpi/sleep # for suspend to disk via s4bios
139 bringing machine down? Suspend to disk, rearrange power cables,
[all …]
/linux-6.8/drivers/block/null_blk/
Dtrace.h24 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.8/drivers/nvme/host/
Dmultipath.c59 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()
128 struct gendisk *disk = ns->head->disk; in nvme_mpath_start_request() local
130 if (!blk_queue_io_stat(disk->queue) || blk_rq_is_passthrough(rq)) in nvme_mpath_start_request()
134 nvme_req(rq)->start_time = bdev_start_io_acct(disk->part0, req_op(rq), in nvme_mpath_start_request()
[all …]
Dtrace.h38 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 …]
/linux-6.8/arch/m68k/emu/
Dnfblock.c57 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.8/drivers/block/drbd/
Ddrbd_state.c127 device_state_change->disk_state[OLD] = device->state.disk; in remember_old_state()
178 device_state_change->disk_state[NEW] = device->state.disk; in remember_new_state()
303 if (device->state.disk != D_DISKLESS || in conn_all_vols_unconf()
376 disk_state = max_t(enum drbd_disk_state, disk_state, device->state.disk); in conn_highest_disk()
392 disk_state = min_t(enum drbd_disk_state, disk_state, device->state.disk); in conn_lowest_disk()
474 (os.disk != D_FAILED && ns.disk == D_FAILED))) || in cl_wide_st_chg()
661 * We grab drbd_md_get_buffer(), because we don't want to "fail" the disk while
675 return drbd_req_state(device, NS(disk, D_FAILED), in request_detach()
689 device->state.disk != D_FAILED); in drbd_request_detach_interruptible()
722 drbd_disk_str(ns.disk), in print_st()
[all …]

12345678910>>...64