Home
last modified time | relevance | path

Searched refs:disk (Results 1 – 25 of 562) sorted by relevance

12345678910>>...23

/kernel/linux/linux-5.10/drivers/block/paride/
Dpd.c247 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 …]
Dpf.c215 static void pf_release(struct gendisk *disk, fmode_t mode);
241 struct gendisk *disk; member
251 static unsigned int pf_check_events(struct gendisk *disk,
295 struct gendisk *disk; in pf_init_units() local
297 disk = alloc_disk(1); in pf_init_units()
298 if (!disk) in pf_init_units()
301 disk->queue = blk_mq_init_sq_queue(&pf->tag_set, &pf_mq_ops, in pf_init_units()
303 if (IS_ERR(disk->queue)) { in pf_init_units()
304 disk->queue = NULL; in pf_init_units()
305 put_disk(disk); in pf_init_units()
[all …]
Dpcd.c202 struct gendisk *disk; member
245 static void pcd_block_release(struct gendisk *disk, fmode_t mode) in pcd_block_release() argument
247 struct pcd_unit *cd = disk->private_data; in pcd_block_release()
266 static unsigned int pcd_block_check_events(struct gendisk *disk, in pcd_block_check_events() argument
269 struct pcd_unit *cd = disk->private_data; in pcd_block_check_events()
312 struct gendisk *disk = alloc_disk(1); in pcd_init_units() local
314 if (!disk) in pcd_init_units()
317 disk->queue = blk_mq_init_sq_queue(&cd->tag_set, &pcd_mq_ops, in pcd_init_units()
319 if (IS_ERR(disk->queue)) { in pcd_init_units()
320 disk->queue = NULL; in pcd_init_units()
[all …]
/kernel/liteos_a/drivers/block/disk/src/
Ddisk.c105 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()
142 if (disk->disk_name == NULL) { in los_alloc_diskid_byname()
[all …]
/kernel/linux/linux-5.10/block/
Dgenhd.c43 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);
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()
146 struct hd_struct *__disk_get_part(struct gendisk *disk, int partno) in __disk_get_part() argument
[all …]
Dblk-zoned.c126 unsigned int blkdev_nr_zones(struct gendisk *disk) in blkdev_nr_zones() argument
128 sector_t zone_sectors = blk_queue_zone_sectors(disk->queue); in blkdev_nr_zones()
130 if (!blk_queue_is_zoned(disk->queue)) in blkdev_nr_zones()
132 return (get_capacity(disk) + zone_sectors - 1) >> ilog2(zone_sectors); in blkdev_nr_zones()
158 struct gendisk *disk = bdev->bd_disk; in blkdev_report_zones() local
159 sector_t capacity = get_capacity(disk); in blkdev_report_zones()
162 WARN_ON_ONCE(!disk->fops->report_zones)) in blkdev_report_zones()
168 return disk->fops->report_zones(disk, sector, nr_zones, cb, data); in blkdev_report_zones()
417 struct gendisk *disk; member
432 struct gendisk *disk = args->disk; in blk_revalidate_zone_cb() local
[all …]
Dblk-integrity.c224 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->ksm) { in blk_integrity_register()
414 blk_ksm_unregister(disk->queue); in blk_integrity_register()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dgenhd.h24 #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()
243 static inline dev_t disk_devt(struct gendisk *disk) in disk_devt() argument
[all …]
/kernel/linux/linux-5.10/block/partitions/
Dcore.c287 struct gendisk *disk = part_to_disk(part); in hd_struct_free_work() local
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()
329 struct gendisk *disk = part_to_disk(part); in delete_partition() local
331 rcu_dereference_protected(disk->part_tbl, 1); in delete_partition()
337 get_device(disk_to_dev(disk)); in delete_partition()
363 static struct hd_struct *add_partition(struct gendisk *disk, int partno, in add_partition() argument
369 struct device *ddev = disk_to_dev(disk); in add_partition()
379 switch (disk->queue->limits.zoned) { in add_partition()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/drivers/block/
Dnull_blk_trace.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->rq_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)
Dnbd.c113 struct gendisk *disk; member
147 #define nbd_name(nbd) ((nbd)->disk->disk_name)
167 return disk_to_dev(nbd->disk); in nbd_to_dev()
214 struct gendisk *disk = dev_to_disk(dev); in pid_show() local
215 struct nbd_device *nbd = (struct nbd_device *)disk->private_data; in pid_show()
227 struct gendisk *disk = nbd->disk; in nbd_dev_remove() local
230 if (disk) { in nbd_dev_remove()
231 q = disk->queue; in nbd_dev_remove()
232 del_gendisk(disk); in nbd_dev_remove()
235 disk->private_data = NULL; in nbd_dev_remove()
[all …]
Dvirtio_blk.c48 struct gendisk *disk; member
199 blk_mq_start_stopped_hw_queues(vblk->disk->queue, true); in virtblk_done()
308 static int virtblk_get_id(struct gendisk *disk, char *id_str) in virtblk_get_id() argument
310 struct virtio_blk *vblk = disk->private_data; in virtblk_get_id()
311 struct request_queue *q = vblk->disk->queue; in virtblk_get_id()
323 blk_execute_rq(vblk->disk->queue, vblk->disk, req, false); in virtblk_get_id()
360 static void virtblk_release(struct gendisk *disk, fmode_t mode) in virtblk_release() argument
362 struct virtio_blk *vblk = disk->private_data; in virtblk_release()
419 struct gendisk *disk = dev_to_disk(dev); in serial_show() local
426 err = virtblk_get_id(disk, buf); in serial_show()
[all …]
/kernel/linux/linux-5.10/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
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 …]
Dsysfs-block1 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 …]
/kernel/linux/linux-5.10/drivers/md/bcache/
Dwriteback.c32 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()
178 struct cache_set *c = dc->disk.c; in update_writeback_rate()
184 set_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate()
192 if (!test_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags) || in update_writeback_rate()
194 clear_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate()
220 if (test_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags) && in update_writeback_rate()
230 clear_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate()
238 if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) || in writeback_delay()
295 atomic_inc(&PTR_BUCKET(dc->disk.c, &w->key, i)->pin); in write_dirty_finish()
[all …]
/kernel/linux/linux-5.10/arch/m68k/emu/
Dnfblock.c59 struct gendisk *disk; member
128 dev->disk = alloc_disk(16); in nfhd_init_one()
129 if (!dev->disk) in nfhd_init_one()
132 dev->disk->major = major_num; in nfhd_init_one()
133 dev->disk->first_minor = dev_id * 16; in nfhd_init_one()
134 dev->disk->fops = &nfhd_ops; in nfhd_init_one()
135 dev->disk->private_data = dev; in nfhd_init_one()
136 sprintf(dev->disk->disk_name, "nfhd%u", dev_id); in nfhd_init_one()
137 set_capacity(dev->disk, (sector_t)blocks * (bsize / 512)); in nfhd_init_one()
138 dev->disk->queue = dev->queue; in nfhd_init_one()
[all …]
/kernel/linux/linux-5.10/drivers/scsi/
Dsr.c142 static inline struct scsi_cd *scsi_cd(struct gendisk *disk) in scsi_cd() argument
144 return container_of(disk->private_data, struct scsi_cd, driver); in scsi_cd()
164 static inline struct scsi_cd *scsi_cd_get(struct gendisk *disk) in scsi_cd_get() argument
169 if (disk->private_data == NULL) in scsi_cd_get()
171 cd = scsi_cd(disk); in scsi_cd_get()
373 if (error_sector < get_capacity(cd->disk) && in sr_done()
375 set_capacity(cd->disk, error_sector); in sr_done()
557 static void sr_block_release(struct gendisk *disk, fmode_t mode) in sr_block_release() argument
559 struct scsi_cd *cd = scsi_cd(disk); in sr_block_release()
655 static unsigned int sr_block_check_events(struct gendisk *disk, in sr_block_check_events() argument
[all …]
/kernel/linux/linux-5.10/drivers/md/
Ddm-era-target.c196 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 …]
/kernel/linux/linux-5.10/drivers/nvdimm/
Dblk.c236 static void nd_blk_release_disk(void *disk) in nd_blk_release_disk() argument
238 del_gendisk(disk); in nd_blk_release_disk()
239 put_disk(disk); in nd_blk_release_disk()
247 struct gendisk *disk; in nsblk_attach_disk() local
263 disk = alloc_disk(0); in nsblk_attach_disk()
264 if (!disk) in nsblk_attach_disk()
267 disk->first_minor = 0; in nsblk_attach_disk()
268 disk->fops = &nd_blk_fops; in nsblk_attach_disk()
269 disk->queue = q; in nsblk_attach_disk()
270 disk->flags = GENHD_FL_EXT_DEVT; in nsblk_attach_disk()
[all …]
/kernel/linux/linux-5.10/Documentation/admin-guide/blockdev/
Dramdisk.rst2 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 …]
/kernel/linux/linux-5.10/fs/
Dblock_dev.c1115 struct gendisk *disk = get_gendisk(bdev->bd_dev, partno); in bdev_get_gendisk() local
1117 if (!disk) in bdev_get_gendisk()
1128 put_disk_and_module(disk); in bdev_get_gendisk()
1131 return disk; in bdev_get_gendisk()
1191 struct gendisk *disk; member
1196 struct gendisk *disk) in bd_find_holder_disk() argument
1201 if (holder->disk == disk) in bd_find_holder_disk()
1244 int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk) in bd_link_disk_holder() argument
1254 if (WARN_ON(!disk->slave_dir || !bdev->bd_part->holder_dir)) in bd_link_disk_holder()
1257 holder = bd_find_holder_disk(bdev, disk); in bd_link_disk_holder()
[all …]
/kernel/linux/linux-5.10/drivers/nvme/host/
Dmultipath.c22 if (h->disk) in nvme_mpath_unfreeze()
23 blk_mq_unfreeze_queue(h->disk->queue); in nvme_mpath_unfreeze()
32 if (h->disk) in nvme_mpath_wait_freeze()
33 blk_mq_freeze_queue_wait(h->disk->queue); in nvme_mpath_wait_freeze()
42 if (h->disk) in nvme_mpath_start_freeze()
43 blk_freeze_queue_start(h->disk->queue); in nvme_mpath_start_freeze()
58 } else if (ns->head->disk) { in nvme_set_disk_name()
100 if (ns->head->disk) in nvme_kick_requeue_lists()
297 struct device *dev = disk_to_dev(head->disk); in nvme_ns_head_submit_bio()
312 bio->bi_disk = ns->disk; in nvme_ns_head_submit_bio()
[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->rq_disk);
76 __entry->ctrl_id, __print_disk_name(__entry->disk),
89 __array(char, disk, DISK_NAME_LEN)
106 __assign_disk_name(__entry->disk, req->rq_disk);
109 __entry->ctrl_id, __print_disk_name(__entry->disk),
149 __array(char, disk, DISK_NAME_LEN)
[all …]
/kernel/linux/linux-5.10/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()
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()
762 if (ns.disk != os.disk && flags & CS_DC_DISK) in print_state_change()
[all …]

12345678910>>...23