Home
last modified time | relevance | path

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

12345678910>>...49

/linux/block/
H A 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 …]
H A Dblk-sysfs.c25 ssize_t (*show)(struct gendisk *disk, char *page);
26 ssize_t (*show_limit)(struct gendisk *disk, char *page);
28 ssize_t (*store)(struct gendisk *disk, const char *page, size_t count);
29 int (*store_limit)(struct gendisk *disk, const char *page,
54 static ssize_t queue_requests_show(struct gendisk *disk, char *page) in queue_requests_show() argument
58 mutex_lock(&disk->queue->elevator_lock); in queue_requests_show()
59 ret = queue_var_show(disk->queue->nr_requests, page); in queue_requests_show()
60 mutex_unlock(&disk->queue->elevator_lock); in queue_requests_show()
65 queue_requests_store(struct gendisk *disk, const char *page, size_t count) in queue_requests_store() argument
67 struct request_queue *q = disk->queue; in queue_requests_store()
[all …]
H A Dblk-zoned.c46 * @disk: The gendisk the plug belongs to.
49 * always at least 1 when the plug is hashed in the disk plug hash table.
68 struct gendisk *disk; member
77 static inline bool disk_need_zone_resources(struct gendisk *disk) in disk_need_zone_resources() argument
86 return queue_is_mq(disk->queue) || in disk_need_zone_resources()
87 queue_emulates_zone_append(disk->queue); in disk_need_zone_resources()
90 static inline unsigned int disk_zone_wplugs_hash_size(struct gendisk *disk) in disk_zone_wplugs_hash_size() argument
92 return 1U << disk->zone_wplugs_hash_bits; in disk_zone_wplugs_hash_size()
103 * from the disk hash table and that the initial reference to the zone
156 static void disk_zone_set_cond(struct gendisk *disk, sector_ argument
193 struct gendisk *disk = bdev->bd_disk; bdev_zone_is_seq() local
226 struct gendisk *disk = bdev->bd_disk; blkdev_do_report_zones() local
490 disk_zone_is_last(struct gendisk * disk,struct blk_zone * zone) disk_zone_is_last() argument
495 disk_zone_is_full(struct gendisk * disk,unsigned int zno,unsigned int offset_in_zone) disk_zone_is_full() argument
503 disk_zone_wplug_is_full(struct gendisk * disk,struct blk_zone_wplug * zwplug) disk_zone_wplug_is_full() argument
509 disk_insert_zone_wplug(struct gendisk * disk,struct blk_zone_wplug * zwplug) disk_insert_zone_wplug() argument
551 disk_get_hashed_zone_wplug(struct gendisk * disk,sector_t sector) disk_get_hashed_zone_wplug() argument
573 disk_get_zone_wplug(struct gendisk * disk,sector_t sector) disk_get_zone_wplug() argument
601 disk_should_remove_zone_wplug(struct gendisk * disk,struct blk_zone_wplug * zwplug) disk_should_remove_zone_wplug() argument
632 disk_remove_zone_wplug(struct gendisk * disk,struct blk_zone_wplug * zwplug) disk_remove_zone_wplug() argument
665 disk_get_and_lock_zone_wplug(struct gendisk * disk,sector_t sector,gfp_t gfp_mask,unsigned long * flags) disk_get_and_lock_zone_wplug() argument
760 disk_zone_wplug_update_cond(struct gendisk * disk,struct blk_zone_wplug * zwplug) disk_zone_wplug_update_cond() argument
779 disk_zone_wplug_set_wp_offset(struct gendisk * disk,struct blk_zone_wplug * zwplug,unsigned int wp_offset) disk_zone_wplug_set_wp_offset() argument
824 disk_zone_wplug_sync_wp_offset(struct gendisk * disk,struct blk_zone * zone) disk_zone_wplug_sync_wp_offset() argument
858 disk_report_zone(struct gendisk * disk,struct blk_zone * zone,unsigned int idx,struct blk_report_zones_args * args) disk_report_zone() argument
944 struct gendisk *disk = bdev->bd_disk; blkdev_get_zone_info() local
1051 struct gendisk *disk = bdev->bd_disk; blkdev_report_zones_cached() local
1093 struct gendisk *disk = bio->bi_bdev->bd_disk; blk_zone_reset_bio_endio() local
1118 struct gendisk *disk = bio->bi_bdev->bd_disk; blk_zone_reset_all_bio_endio() local
1150 struct gendisk *disk = bdev->bd_disk; blk_zone_finish_bio_endio() local
1195 disk_zone_wplug_schedule_bio_work(struct gendisk * disk,struct blk_zone_wplug * zwplug) disk_zone_wplug_schedule_bio_work() argument
1210 disk_zone_wplug_add_bio(struct gendisk * disk,struct blk_zone_wplug * zwplug,struct bio * bio,unsigned int nr_segs) disk_zone_wplug_add_bio() argument
1251 struct gendisk *disk = bio->bi_bdev->bd_disk; blk_zone_write_plug_bio_merged() local
1292 struct gendisk *disk = q->disk; blk_zone_write_plug_init_request() local
1353 struct gendisk *disk = bio->bi_bdev->bd_disk; blk_zone_wplug_prepare_bio() local
1409 struct gendisk *disk = bio->bi_bdev->bd_disk; blk_zone_wplug_handle_write() local
1494 struct gendisk *disk = bio->bi_bdev->bd_disk; blk_zone_wplug_handle_native_zone_append() local
1618 disk_zone_wplug_unplug_bio(struct gendisk * disk,struct blk_zone_wplug * zwplug) disk_zone_wplug_unplug_bio() argument
1660 struct gendisk *disk = bio->bi_bdev->bd_disk; blk_zone_write_plug_bio_endio() local
1709 struct gendisk *disk = req->q->disk; blk_zone_write_plug_finish_request() local
1783 disk_init_zone_resources(struct gendisk * disk) disk_init_zone_resources() argument
1797 disk_alloc_zone_resources(struct gendisk * disk,unsigned int pool_size) disk_alloc_zone_resources() argument
1838 disk_destroy_zone_wplugs_hash_table(struct gendisk * disk) disk_destroy_zone_wplugs_hash_table() argument
1871 disk_set_zones_cond_array(struct gendisk * disk,u8 * zones_cond) disk_set_zones_cond_array() argument
1883 disk_free_zone_resources(struct gendisk * disk) disk_free_zone_resources() argument
1899 struct gendisk *disk; global() member
1908 disk_revalidate_zone_resources(struct gendisk * disk,struct blk_revalidate_zone_args * args) disk_revalidate_zone_resources() argument
1945 disk_update_zone_resources(struct gendisk * disk,struct blk_revalidate_zone_args * args) disk_update_zone_resources() argument
2058 struct gendisk *disk = args->disk; blk_revalidate_conv_zone() local
2077 struct gendisk *disk = args->disk; blk_revalidate_seq_zone() local
2126 struct gendisk *disk = args->disk; blk_revalidate_zone_cb() local
2204 blk_revalidate_disk_zones(struct gendisk * disk) blk_revalidate_disk_zones() argument
2289 struct gendisk *disk = bdev->bd_disk; blk_zone_issue_zeroout() local
2345 struct gendisk *disk = q->disk; queue_zone_wplugs_show() local
[all...]
H A Dholder.c14 struct gendisk *disk) in bd_find_holder_disk() argument
18 list_for_each_entry(holder, &disk->slave_bdevs, list) in bd_find_holder_disk()
35 * bd_link_disk_holder - create symlinks between holding disk and slave bdev
37 * @disk: the holding disk
43 * - from "slaves" directory of the holder @disk to the claimed @bdev
44 * - from "holders" directory of the @bdev to the holder @disk
46 * For example, if /dev/dm-0 maps to /dev/sda and disk for dm-0 is
53 * ensure that both @bdev and @disk are valid during the creation and
62 int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk) in bd_link_disk_holder() argument
67 if (WARN_ON_ONCE(!disk->slave_dir)) in bd_link_disk_holder()
[all …]
H A 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()
125 &disk->queue_kobj, "%s", 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()
[all …]
H A Dblk-wbt.h7 int wbt_init(struct gendisk *disk);
8 void wbt_init_enable_default(struct gendisk *disk);
9 void wbt_disable_default(struct gendisk *disk);
10 void wbt_enable_default(struct gendisk *disk);
20 static inline void wbt_init_enable_default(struct gendisk *disk) in wbt_init_enable_default() argument
24 static inline void wbt_disable_default(struct gendisk *disk) in wbt_disable_default() argument
27 static inline void wbt_enable_default(struct gendisk *disk) in wbt_enable_default() argument
/linux/Documentation/admin-guide/
H A 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 …]
H A Dldm.rst2 LDM - Logical Disk Manager (Dynamic Disks)
13 1MiB journalled database at the end of the physical disk. The size of
14 partitions is limited only by disk space. The maximum number of partitions is
25 Once the LDM driver has divided up the disk, you can use the MD driver to
28 To prevent legacy applications from repartitioning the disk, the LDM creates a
29 dummy MSDOS partition containing one disk-sized partition. This is what is
33 GPT label disk. This is not supported by the Linux LDM driver yet.
39 Below we have a 50MiB disk, divided into seven partitions.
43 The missing 1MiB at the end of the disk is where the LDM database is
67 disk, but the driver will sort them.
[all …]
/linux/block/partitions/
H A Dcore.c17 * Probe partition formats with tables at disk address 0
32 * disk address 0xdc0. Since these may also have stale
132 state->disk = hd; in check_partition()
290 * Must be called either with open_mutex held, before a disk can be opened or
291 * after all disk users are gone.
293 static struct block_device *add_partition(struct gendisk *disk, int partno, in add_partition() argument
298 struct device *ddev = disk_to_dev(disk); in add_partition()
304 lockdep_assert_held(&disk->open_mutex); in add_partition()
313 if (bdev_is_zoned(disk->part0)) { in add_partition()
315 disk->disk_name); in add_partition()
[all …]
/linux/Documentation/ABI/testing/
H A 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 …]
H A 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/Documentation/admin-guide/blockdev/
H A 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/Documentation/driver-api/md/
H A 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/drivers/md/
H A Ddm-zone.c37 args->next_sector < get_capacity(md->disk)); in dm_blk_do_report_zones()
47 int dm_blk_report_zones(struct gendisk *disk, sector_t sector, in dm_blk_report_zones() argument
51 struct mapped_device *md = disk->private_data; in dm_blk_report_zones()
75 .disk = md->disk, in dm_blk_report_zones()
125 return disk_report_zone(args->disk, zone, args->zone_idx++, in dm_report_zones_cb()
172 struct gendisk *disk = md->disk; in dm_revalidate_zones() local
173 unsigned int nr_zones = disk->nr_zones; in dm_revalidate_zones()
176 if (!get_capacity(disk)) in dm_revalidate_zones()
186 DMINFO("%s using %s zone append", disk->disk_name, in dm_revalidate_zones()
196 ret = blk_revalidate_disk_zones(disk); in dm_revalidate_zones()
[all …]
H A Ddm-era-target.c40 * disk.
46 * This does not free off the on disk bitset as this will normally be done
87 * Wipes the in-core bitset, and creates a new on disk bitset.
156 * On disk metadata layout
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
[all …]
/linux/Documentation/power/
H A 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/drivers/block/
H A Dn64cart.c121 struct gendisk *disk; in n64cart_probe() local
138 disk = blk_alloc_disk(&lim, NUMA_NO_NODE); in n64cart_probe()
139 if (IS_ERR(disk)) { in n64cart_probe()
140 err = PTR_ERR(disk); in n64cart_probe()
144 disk->first_minor = 0; in n64cart_probe()
145 disk->flags = GENHD_FL_NO_PART; in n64cart_probe()
146 disk->fops = &n64cart_fops; in n64cart_probe()
147 disk->private_data = &pdev->dev; in n64cart_probe()
148 strcpy(disk->disk_name, "n64cart"); in n64cart_probe()
150 set_capacity(disk, size >> SECTOR_SHIFT); in n64cart_probe()
[all …]
H A 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 …]
H A Dnbd.c124 struct gendisk *disk; member
163 #define nbd_name(nbd) ((nbd)->disk->disk_name)
181 return disk_to_dev(nbd->disk); in nbd_to_dev()
239 struct gendisk *disk = dev_to_disk(dev); in pid_show() local
240 struct nbd_device *nbd = disk->private_data; in pid_show()
253 struct gendisk *disk = dev_to_disk(dev); in backend_show() local
254 struct nbd_device *nbd = disk->private_data; in backend_show()
266 struct gendisk *disk = nbd->disk; in nbd_dev_remove() local
268 del_gendisk(disk); in nbd_dev_remove()
279 put_disk(disk); in nbd_dev_remove()
[all …]
/linux/drivers/nvme/host/
H A 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 …]
H A Dmultipath.c113 if (h->disk) in nvme_mpath_unfreeze()
114 blk_mq_unfreeze_queue_nomemrestore(h->disk->queue); in nvme_mpath_unfreeze()
123 if (h->disk) in nvme_mpath_wait_freeze()
124 blk_mq_freeze_queue_wait(h->disk->queue); in nvme_mpath_wait_freeze()
133 if (h->disk) in nvme_mpath_start_freeze()
134 blk_freeze_queue_start(h->disk->queue); in nvme_mpath_start_freeze()
158 bio_set_dev(bio, ns->head->disk->part0); in nvme_failover_req()
183 struct gendisk *disk = ns->head->disk; in nvme_mpath_start_request() local
191 if (!blk_queue_io_stat(disk->queue) || blk_rq_is_passthrough(rq) || in nvme_mpath_start_request()
196 nvme_req(rq)->start_time = bdev_start_io_acct(disk->part0, req_op(rq), in nvme_mpath_start_request()
[all …]
/linux/drivers/block/drbd/
H A 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 …]
/linux/drivers/scsi/
H A Dsr.c8 * Linux scsi disk driver by
140 static inline struct scsi_cd *scsi_cd(struct gendisk *disk) in scsi_cd() argument
142 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()
495 static int sr_block_open(struct gendisk *disk, blk_mode_t mode) in sr_block_open() argument
497 struct scsi_cd *cd = scsi_cd(disk); in sr_block_open()
505 if (disk_check_media_change(disk)) { in sr_block_open()
[all …]
/linux/fs/quota/
H A Dquotaio_v2.h34 * The following structure defines the format of the disk quota file
35 * (as it appears on disk) - the file is a radix tree whose leaves point
43 __le32 dqb_bhardlimit; /* absolute limit on disk space (in QUOTABLOCK_SIZE) */
44 __le32 dqb_bsoftlimit; /* preferred limit on disk space (in QUOTABLOCK_SIZE) */
46 __le64 dqb_btime; /* time limit for excessive disk use */
56 __le64 dqb_bhardlimit; /* absolute limit on disk space (in QUOTABLOCK_SIZE) */
57 __le64 dqb_bsoftlimit; /* preferred limit on disk space (in QUOTABLOCK_SIZE) */
59 __le64 dqb_btime; /* time limit for excessive disk use */
/linux/Documentation/filesystems/ext4/
H A Dallocators.rst7 generally a desirably quality of a filesystem. On a spinning disk,
9 that the head actuator and disk must perform to access a data block,
10 thus speeding up disk IO. On an SSD there of course are no moving parts,
19 speculatively allocates 8KiB of disk space to the file on the assumption
26 the filesystem defers deciding the exact placement on the disk until all
27 the dirty buffers are being written out to disk. By not committing to a
43 The fifth trick is that the disk volume is cut up into 128MB block
49 over a disk; as the top-level directory/file blobs fill up one block

12345678910>>...49