/block/ |
D | ioctl.c | 13 static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user *arg) in blkpg_ioctl() argument 30 disk = bdev->bd_disk; in blkpg_ioctl() 31 if (bdev != bdev->bd_contains) in blkpg_ioctl() 49 if (p.start & (bdev_logical_block_size(bdev) - 1)) in blkpg_ioctl() 52 mutex_lock(&bdev->bd_mutex); in blkpg_ioctl() 61 mutex_unlock(&bdev->bd_mutex); in blkpg_ioctl() 70 mutex_unlock(&bdev->bd_mutex); in blkpg_ioctl() 92 mutex_lock_nested(&bdev->bd_mutex, 1); in blkpg_ioctl() 94 mutex_unlock(&bdev->bd_mutex); in blkpg_ioctl() 120 mutex_lock_nested(&bdev->bd_mutex, 1); in blkpg_ioctl() [all …]
|
D | compat_ioctl.c | 52 static int compat_hdio_getgeo(struct gendisk *disk, struct block_device *bdev, in compat_hdio_getgeo() argument 68 geo.start = get_start_sect(bdev); in compat_hdio_getgeo() 69 ret = disk->fops->getgeo(bdev, &geo); in compat_hdio_getgeo() 81 static int compat_hdio_ioctl(struct block_device *bdev, fmode_t mode, in compat_hdio_ioctl() argument 88 error = __blkdev_driver_ioctl(bdev, mode, in compat_hdio_ioctl() 118 static int compat_cdrom_read_audio(struct block_device *bdev, fmode_t mode, in compat_cdrom_read_audio() argument 141 return __blkdev_driver_ioctl(bdev, mode, cmd, in compat_cdrom_read_audio() 145 static int compat_cdrom_generic_command(struct block_device *bdev, fmode_t mode, in compat_cdrom_generic_command() argument 174 return __blkdev_driver_ioctl(bdev, mode, cmd, (unsigned long)cgc); in compat_cdrom_generic_command() 184 static int compat_blkpg_ioctl(struct block_device *bdev, fmode_t mode, in compat_blkpg_ioctl() argument [all …]
|
D | blk-lib.c | 26 int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, in __blkdev_issue_discard() argument 30 struct request_queue *q = bdev_get_queue(bdev); in __blkdev_issue_discard() 50 bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1; in __blkdev_issue_discard() 56 alignment = (bdev_discard_alignment(bdev) >> 9) % granularity; in __blkdev_issue_discard() 89 bio_set_dev(bio, bdev); in __blkdev_issue_discard() 129 int blkdev_issue_discard(struct block_device *bdev, sector_t sector, in blkdev_issue_discard() argument 137 ret = __blkdev_issue_discard(bdev, sector, nr_sects, gfp_mask, flags, in blkdev_issue_discard() 163 static int __blkdev_issue_write_same(struct block_device *bdev, sector_t sector, in __blkdev_issue_write_same() argument 167 struct request_queue *q = bdev_get_queue(bdev); in __blkdev_issue_write_same() 175 bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1; in __blkdev_issue_write_same() [all …]
|
D | blk-zoned.c | 29 static bool blkdev_report_zone(struct block_device *bdev, in blkdev_report_zone() argument 33 sector_t offset = get_start_sect(bdev); in blkdev_report_zone() 39 if (rep->start + rep->len > bdev->bd_part->nr_sects) in blkdev_report_zone() 65 int blkdev_report_zones(struct block_device *bdev, in blkdev_report_zones() argument 71 struct request_queue *q = bdev_get_queue(bdev); in blkdev_report_zones() 94 if (sector > bdev->bd_part->nr_sects) { in blkdev_report_zones() 119 bio_set_dev(bio, bdev); in blkdev_report_zones() 169 if (blkdev_report_zone(bdev, addr + ofst, &zones[nz])) in blkdev_report_zones() 204 int blkdev_reset_zones(struct block_device *bdev, in blkdev_reset_zones() argument 208 struct request_queue *q = bdev_get_queue(bdev); in blkdev_reset_zones() [all …]
|
D | partition-generic.c | 47 const char *bdevname(struct block_device *bdev, char *buf) in bdevname() argument 49 return disk_name(bdev->bd_disk, bdev->bd_part->partno, buf); in bdevname() 434 static int drop_partitions(struct gendisk *disk, struct block_device *bdev) in drop_partitions() argument 440 if (bdev->bd_part_count || bdev->bd_super) in drop_partitions() 455 struct block_device *bdev, in part_zone_aligned() argument 458 unsigned int zone_sectors = bdev_zone_sectors(bdev); in part_zone_aligned() 504 int rescan_partitions(struct gendisk *disk, struct block_device *bdev) in rescan_partitions() argument 515 res = drop_partitions(disk, bdev); in rescan_partitions() 521 check_disk_size_change(disk, bdev); in rescan_partitions() 522 bdev->bd_invalidated = 0; in rescan_partitions() [all …]
|
D | genhd.c | 570 struct block_device *bdev; in register_disk() local 611 bdev = bdget_disk(disk, 0); in register_disk() 612 if (!bdev) in register_disk() 615 bdev->bd_invalidated = 1; in register_disk() 616 err = blkdev_get(bdev, FMODE_READ, NULL); in register_disk() 619 blkdev_put(bdev, FMODE_READ); in register_disk() 820 struct block_device *bdev = NULL; in bdget_disk() local 824 bdev = bdget(part_devt(part)); in bdget_disk() 827 return bdev; in bdget_disk() 1467 void set_device_ro(struct block_device *bdev, int flag) in set_device_ro() argument [all …]
|
D | blk-settings.c | 685 int bdev_stack_limits(struct queue_limits *t, struct block_device *bdev, in bdev_stack_limits() argument 688 struct request_queue *bq = bdev_get_queue(bdev); in bdev_stack_limits() 690 start += get_start_sect(bdev); in bdev_stack_limits() 706 void disk_stack_limits(struct gendisk *disk, struct block_device *bdev, in disk_stack_limits() argument 711 if (bdev_stack_limits(&t->limits, bdev, offset >> 9) < 0) { in disk_stack_limits() 715 bdevname(bdev, bottom); in disk_stack_limits()
|
D | blk-flush.c | 504 int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask, in blkdev_issue_flush() argument 511 if (bdev->bd_disk == NULL) in blkdev_issue_flush() 514 q = bdev_get_queue(bdev); in blkdev_issue_flush() 528 bio_set_dev(bio, bdev); in blkdev_issue_flush()
|
D | cmdline-parser.c | 213 const char *bdev) in cmdline_parts_find() argument 215 while (parts && strncmp(bdev, parts->name, sizeof(parts->name))) in cmdline_parts_find()
|
/block/partitions/ |
D | efi.c | 148 static u64 last_lba(struct block_device *bdev) in last_lba() argument 150 if (!bdev || !bdev->bd_inode) in last_lba() 152 return div_u64(bdev->bd_inode->i_size, in last_lba() 153 bdev_logical_block_size(bdev)) - 1ULL; in last_lba() 255 struct block_device *bdev = state->bdev; in read_lba() local 256 sector_t n = lba * (bdev_logical_block_size(bdev) / 512); in read_lba() 258 if (!buffer || lba > last_lba(bdev)) in read_lba() 326 unsigned ssz = bdev_logical_block_size(state->bdev); in alloc_read_gpt_header() 373 bdev_logical_block_size(state->bdev)) { in is_gpt_valid() 376 bdev_logical_block_size(state->bdev)); in is_gpt_valid() [all …]
|
D | cmdline.c | 71 char bdev[BDEVNAME_SIZE]; in cmdline_partition() local 88 bdevname(state->bdev, bdev); in cmdline_partition() 89 parts = cmdline_parts_find(bdev_parts, bdev); in cmdline_partition() 93 disk_size = get_capacity(state->bdev->bd_disk) << 9; in cmdline_partition()
|
D | check.h | 11 struct block_device *bdev; member 34 if (n >= get_capacity(state->bdev->bd_disk)) { in read_part_sector() 38 return read_dev_sector(state->bdev, n, p); in read_part_sector()
|
D | ibm.c | 292 struct block_device *bdev = state->bdev; in ibm_partition() local 303 blocksize = bdev_logical_block_size(bdev); in ibm_partition() 306 i_size = i_size_read(bdev->bd_inode); in ibm_partition() 318 if (ioctl_by_bdev(bdev, HDIO_GETGEO, (unsigned long)geo) != 0) in ibm_partition() 320 if (ioctl_by_bdev(bdev, BIODASDINFO2, (unsigned long)info) != 0) { in ibm_partition()
|
D | aix.c | 79 static u64 last_lba(struct block_device *bdev) in last_lba() argument 81 if (!bdev || !bdev->bd_inode) in last_lba() 83 return (bdev->bd_inode->i_size >> 9) - 1ULL; in last_lba() 101 if (!buffer || lba + count / 512 > last_lba(state->bdev)) in read_lba()
|
D | check.c | 143 check_partition(struct gendisk *hd, struct block_device *bdev) in check_partition() argument 158 state->bdev = bdev; in check_partition()
|
D | amiga.c | 47 bdevname(state->bdev, b), blk); in amiga_partition() 69 bdevname(state->bdev, b), blk); in amiga_partition() 90 bdevname(state->bdev, b), blk); in amiga_partition()
|
D | atari.c | 50 if (bdev_logical_block_size(state->bdev) != 512) in atari_partition() 58 hd_size = state->bdev->bd_inode->i_size >> 9; in atari_partition()
|
D | sgi.c | 61 bdevname(state->bdev, b)); in sgi_partition()
|
D | acorn.c | 284 nr_sects = (state->bdev->bd_inode->i_size >> 9) - start_sect; in adfspart_check_ADFS() 549 size = get_capacity(state->bdev->bd_disk); in adfspart_check_EESOX()
|
D | mac.c | 136 note_bootable_part(state->bdev->bd_dev, found_root, in mac_partition()
|
D | sun.c | 82 bdevname(state->bdev, b)); in sun_partition()
|
D | msdos.c | 129 sector_t sector_size = bdev_logical_block_size(state->bdev) / 512; in parse_extended() 454 sector_t sector_size = bdev_logical_block_size(state->bdev) / 512; in msdos_partition()
|
D | ldm.c | 321 num_sects = state->bdev->bd_inode->i_size >> 9; in ldm_validate_privheads()
|