Home
last modified time | relevance | path

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

1234567

/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 …]
/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()
209 struct cache_set *c = dc->disk.c; in update_writeback_rate()
215 set_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate()
223 if (!test_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags) || in update_writeback_rate()
225 clear_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate()
251 if (test_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags) && in update_writeback_rate()
261 clear_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate()
269 if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) || in writeback_delay()
326 atomic_inc(&PTR_BUCKET(dc->disk.c, &w->key, i)->pin); in write_dirty_finish()
[all …]
Dsuper.c801 bd_unlink_disk_holder(ca->bdev, d->disk); in bcache_device_unlink()
811 bd_link_disk_holder(ca->bdev, d->disk); in bcache_device_link()
874 struct gendisk *disk = d->disk; in bcache_device_free() local
878 if (disk) in bcache_device_free()
879 pr_info("%s stopped\n", disk->disk_name); in bcache_device_free()
886 if (disk) { in bcache_device_free()
887 bool disk_added = (disk->flags & GENHD_FL_UP) != 0; in bcache_device_free()
890 del_gendisk(disk); in bcache_device_free()
892 if (disk->queue) in bcache_device_free()
893 blk_cleanup_queue(disk->queue); in bcache_device_free()
[all …]
Dwriteback.h78 int stripe = offset_to_stripe(&dc->disk, offset); in bcache_dev_stripe_dirty()
84 if (atomic_read(dc->disk.stripe_sectors_dirty + stripe)) in bcache_dev_stripe_dirty()
87 if (nr_sectors <= dc->disk.stripe_size) in bcache_dev_stripe_dirty()
90 nr_sectors -= dc->disk.stripe_size; in bcache_dev_stripe_dirty()
101 unsigned int in_use = dc->disk.c->gc_stats.in_use; in should_writeback()
104 test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) || in should_writeback()
/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->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)
/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 …]
/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 …]
Dsd.h74 struct gendisk *disk; member
134 static inline struct scsi_disk *scsi_disk(struct gendisk *disk) in scsi_disk() argument
136 return container_of(disk->private_data, struct scsi_disk, driver); in scsi_disk()
140 (sdsk)->disk ? \
142 (sdsk)->disk->disk_name, fmt, ##a) : \
209 static inline void sd_dif_config_host(struct scsi_disk *disk) in sd_dif_config_host() argument
229 int sd_zbc_report_zones(struct gendisk *disk, sector_t sector,
/drivers/block/
Dnbd.c113 struct gendisk *disk; member
141 #define nbd_name(nbd) ((nbd)->disk->disk_name)
161 return disk_to_dev(nbd->disk); in nbd_to_dev()
208 struct gendisk *disk = dev_to_disk(dev); in pid_show() local
209 struct nbd_device *nbd = (struct nbd_device *)disk->private_data; in pid_show()
221 struct gendisk *disk = nbd->disk; in nbd_dev_remove() local
224 if (disk) { in nbd_dev_remove()
225 q = disk->queue; in nbd_dev_remove()
226 del_gendisk(disk); in nbd_dev_remove()
229 disk->private_data = NULL; in nbd_dev_remove()
[all …]
Dvirtio_blk.c51 struct gendisk *disk; member
202 blk_mq_start_stopped_hw_queues(vblk->disk->queue, true); in virtblk_done()
313 static int virtblk_get_id(struct gendisk *disk, char *id_str) in virtblk_get_id() argument
315 struct virtio_blk *vblk = disk->private_data; in virtblk_get_id()
316 struct request_queue *q = vblk->disk->queue; in virtblk_get_id()
328 blk_execute_rq(vblk->disk->queue, vblk->disk, req, false); in virtblk_get_id()
365 static void virtblk_release(struct gendisk *disk, fmode_t mode) in virtblk_release() argument
367 struct virtio_blk *vblk = disk->private_data; in virtblk_release()
424 struct gendisk *disk = dev_to_disk(dev); in serial_show() local
431 err = virtblk_get_id(disk, buf); in serial_show()
[all …]
Dswim.c188 struct gendisk *disk; member
635 set_capacity(fs->disk, fs->total_secs); in floppy_open()
671 static void floppy_release(struct gendisk *disk, fmode_t mode) in floppy_release() argument
673 struct floppy_state *fs = disk->private_data; in floppy_release()
731 static unsigned int floppy_check_events(struct gendisk *disk, in floppy_check_events() argument
734 struct floppy_state *fs = disk->private_data; in floppy_check_events()
757 return get_disk_and_module(swd->unit[drive].disk); in floppy_find()
817 swd->unit[drive].disk = alloc_disk(1); in swim_floppy_init()
818 if (swd->unit[drive].disk == NULL) { in swim_floppy_init()
830 swd->unit[drive].disk->queue = q; in swim_floppy_init()
[all …]
Dataflop.c300 struct gendisk *disk; member
448 static void floppy_release(struct gendisk *disk, fmode_t mode);
742 struct request_queue *q = unit[drive].disk->queue; in do_format()
1177 set_capacity(unit[SelectedDrive].disk, in fd_rwsec_done1()
1192 set_capacity(unit[SelectedDrive].disk, in fd_rwsec_done1()
1428 static unsigned int floppy_check_events(struct gendisk *disk, in floppy_check_events() argument
1431 struct atari_floppy_struct *p = disk->private_data; in floppy_check_events()
1451 static int floppy_revalidate(struct gendisk *disk) in floppy_revalidate() argument
1453 struct atari_floppy_struct *p = disk->private_data; in floppy_revalidate()
1536 set_capacity(floppy->disk, UDT->blocks); in ataflop_queue_rq()
[all …]
Damiflop.c199 int disk; /* disk in drive (-1 == unknown) */ member
931 static unsigned long *putsec(int disk, unsigned long *raw, int cnt) in putsec() argument
936 disk&=3; in putsec()
942 hdr.track = unit[disk].track; in putsec()
944 hdr.ord = unit[disk].dtype->sects * unit[disk].type->sect_mult - cnt; in putsec()
949 hdr.datachk = checksum((ulong *)(unit[disk].trackbuf+cnt*512), 512); in putsec()
959 encode_block(raw, (ulong *)(unit[disk].trackbuf+cnt*512), 512); in putsec()
965 static void amiga_write(int disk) in amiga_write() argument
970 disk&=3; in amiga_write()
972 for (cnt = 0; cnt < 415 * unit[disk].type->sect_mult; cnt++) in amiga_write()
[all …]
Dswim3.c252 static void floppy_release(struct gendisk *disk, fmode_t mode);
253 static unsigned int floppy_check_events(struct gendisk *disk,
255 static int floppy_revalidate(struct gendisk *disk);
989 static void floppy_release(struct gendisk *disk, fmode_t mode) in floppy_release() argument
991 struct floppy_state *fs = disk->private_data; in floppy_release()
1007 static unsigned int floppy_check_events(struct gendisk *disk, in floppy_check_events() argument
1010 struct floppy_state *fs = disk->private_data; in floppy_check_events()
1014 static int floppy_revalidate(struct gendisk *disk) in floppy_revalidate() argument
1016 struct floppy_state *fs = disk->private_data; in floppy_revalidate()
1176 struct gendisk *disk; in swim3_attach() local
[all …]
/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 …]
Dpmem.c362 del_gendisk(pmem->disk); in pmem_release_disk()
363 put_disk(pmem->disk); in pmem_release_disk()
385 struct gendisk *disk; in pmem_attach_disk() local
472 disk = alloc_disk_node(0, nid); in pmem_attach_disk()
473 if (!disk) in pmem_attach_disk()
475 pmem->disk = disk; in pmem_attach_disk()
477 disk->fops = &pmem_fops; in pmem_attach_disk()
478 disk->queue = q; in pmem_attach_disk()
479 disk->flags = GENHD_FL_EXT_DEVT; in pmem_attach_disk()
480 disk->private_data = pmem; in pmem_attach_disk()
[all …]
/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 …]
/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),
146 __array(char, disk, DISK_NAME_LEN)
[all …]
/drivers/ide/
Dide-gd.c34 static struct ide_disk_obj *ide_disk_get(struct gendisk *disk) in ide_disk_get() argument
39 idkp = ide_drv_g(disk, ide_disk_obj); in ide_disk_get()
70 struct gendisk *g = idkp->disk; in ide_gd_remove()
86 struct gendisk *g = idkp->disk; in ide_disk_release()
186 struct gendisk *disk = bdev->bd_disk; local
191 idkp = ide_disk_get(disk);
205 ret = drive->disk_ops->init_media(drive, disk);
227 drive->disk_ops->set_doorlock(drive, disk, 1);
232 set_capacity(disk, ide_gd_capacity(drive));
233 set_bit(GD_NEED_PART_SCAN, &disk->state);
[all …]
Dide-tape.c144 struct gendisk *disk; member
232 static struct ide_tape_obj *ide_tape_get(struct gendisk *disk, bool cdev, in ide_tape_get() argument
242 tape = ide_drv_g(disk, ide_tape_obj); in ide_tape_get()
687 struct gendisk *disk = tape->disk; in idetape_wait_ready() local
694 if (ide_do_test_unit_ready(drive, disk) == 0) in idetape_wait_ready()
701 ide_do_start_stop(drive, disk, IDETAPE_LU_LOAD_MASK); in idetape_wait_ready()
719 rc = ide_queue_pc_tail(drive, tape->disk, &pc, NULL, 0); in idetape_flush_tape_buffers()
739 if (ide_queue_pc_tail(drive, tape->disk, &pc, buf, pc.req_xfer)) in ide_tape_read_position()
807 struct gendisk *disk = tape->disk; in idetape_position_tape() local
815 ret = ide_queue_pc_tail(drive, disk, &pc, NULL, 0); in idetape_position_tape()
[all …]
/drivers/cdrom/
Dgdrom.c97 struct gendisk *disk; member
490 static void gdrom_bdops_release(struct gendisk *disk, fmode_t mode) in gdrom_bdops_release() argument
497 static unsigned int gdrom_bdops_check_events(struct gendisk *disk, in gdrom_bdops_check_events() argument
718 gd.disk->major = gdrom_major; in probe_gdrom_setupdisk()
719 gd.disk->first_minor = 1; in probe_gdrom_setupdisk()
720 gd.disk->minors = 1; in probe_gdrom_setupdisk()
721 strcpy(gd.disk->disk_name, GDROM_DEV_NAME); in probe_gdrom_setupdisk()
731 gd.disk->queue = gd.gdrom_rq; in probe_gdrom_setupqueue()
774 gd.disk = alloc_disk(1); in probe_gdrom()
775 if (!gd.disk) { in probe_gdrom()
[all …]
/drivers/s390/block/
Dxpram.c369 struct gendisk *disk = xpram_disks[i]; in xpram_setup_blkdev() local
374 disk->major = XPRAM_MAJOR; in xpram_setup_blkdev()
375 disk->first_minor = i; in xpram_setup_blkdev()
376 disk->fops = &xpram_devops; in xpram_setup_blkdev()
377 disk->private_data = &xpram_devices[i]; in xpram_setup_blkdev()
378 disk->queue = xpram_queues[i]; in xpram_setup_blkdev()
379 sprintf(disk->disk_name, "slram%d", i); in xpram_setup_blkdev()
380 set_capacity(disk, xpram_sizes[i] << 1); in xpram_setup_blkdev()
381 add_disk(disk); in xpram_setup_blkdev()

1234567