/fs/ |
D | block_dev.c | 31 struct block_device bdev; member 44 return &BDEV_I(inode)->bdev; in I_BDEV() 49 static sector_t max_block(struct block_device *bdev) in max_block() argument 52 loff_t sz = i_size_read(bdev->bd_inode); in max_block() 55 unsigned int size = block_size(bdev); in max_block() 63 static void kill_bdev(struct block_device *bdev) in kill_bdev() argument 65 if (bdev->bd_inode->i_mapping->nrpages == 0) in kill_bdev() 68 truncate_inode_pages(bdev->bd_inode->i_mapping, 0); in kill_bdev() 71 int set_blocksize(struct block_device *bdev, int size) in set_blocksize() argument 78 if (size < bdev_hardsect_size(bdev)) in set_blocksize() [all …]
|
D | buffer.c | 172 int sync_blockdev(struct block_device *bdev) in sync_blockdev() argument 176 if (bdev) in sync_blockdev() 177 ret = filemap_write_and_wait(bdev->bd_inode->i_mapping); in sync_blockdev() 187 int fsync_bdev(struct block_device *bdev) in fsync_bdev() argument 189 struct super_block *sb = get_super(bdev); in fsync_bdev() 195 return sync_blockdev(bdev); in fsync_bdev() 212 struct super_block *freeze_bdev(struct block_device *bdev) in freeze_bdev() argument 217 mutex_lock(&bdev->bd_fsfreeze_mutex); in freeze_bdev() 218 if (bdev->bd_fsfreeze_count > 0) { in freeze_bdev() 219 bdev->bd_fsfreeze_count++; in freeze_bdev() [all …]
|
D | mbcache.c | 325 mb_cache_shrink(struct block_device *bdev) in mb_cache_shrink() argument 334 if (ce->e_bdev == bdev) { in mb_cache_shrink() 435 mb_cache_entry_insert(struct mb_cache_entry *ce, struct block_device *bdev, in mb_cache_entry_insert() argument 443 bucket = hash_long((unsigned long)bdev + (block & 0xffffffff), in mb_cache_entry_insert() 449 if (ce->e_bdev == bdev && ce->e_block == block) in mb_cache_entry_insert() 453 ce->e_bdev = bdev; in mb_cache_entry_insert() 509 mb_cache_entry_get(struct mb_cache *cache, struct block_device *bdev, in mb_cache_entry_get() argument 516 bucket = hash_long((unsigned long)bdev + (block & 0xffffffff), in mb_cache_entry_get() 521 if (ce->e_bdev == bdev && ce->e_block == block) { in mb_cache_entry_get() 557 int index, struct block_device *bdev, unsigned int key) in __mb_cache_entry_find() argument [all …]
|
D | super.c | 512 struct super_block * get_super(struct block_device *bdev) in get_super() argument 516 if (!bdev) in get_super() 522 if (sb->s_bdev == bdev) { in get_super() 784 struct block_device *bdev; in get_sb_bdev() local 792 bdev = open_bdev_exclusive(dev_name, mode, fs_type); in get_sb_bdev() 793 if (IS_ERR(bdev)) in get_sb_bdev() 794 return PTR_ERR(bdev); in get_sb_bdev() 801 down(&bdev->bd_mount_sem); in get_sb_bdev() 802 s = sget(fs_type, test_bdev_super, set_bdev_super, bdev); in get_sb_bdev() 803 up(&bdev->bd_mount_sem); in get_sb_bdev() [all …]
|
D | mpage.c | 96 mpage_alloc(struct block_device *bdev, in mpage_alloc() argument 110 bio->bi_bdev = bdev; in mpage_alloc() 183 struct block_device *bdev = NULL; in do_mpage_readpage() local 220 bdev = map_bh->b_bdev; in do_mpage_readpage() 275 bdev = map_bh->b_bdev; in do_mpage_readpage() 297 bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9), in do_mpage_readpage() 298 min_t(int, nr_pages, bio_get_nr_vecs(bdev)), in do_mpage_readpage() 457 struct block_device *bdev = NULL; in __mpage_writepage() local 501 bdev = bh->b_bdev; in __mpage_writepage() 542 bdev = map_bh.b_bdev; in __mpage_writepage() [all …]
|
/fs/partitions/ |
D | efi.c | 140 last_lba(struct block_device *bdev) in last_lba() argument 142 if (!bdev || !bdev->bd_inode) in last_lba() 144 return (bdev->bd_inode->i_size >> 9) - 1ULL; in last_lba() 188 read_lba(struct block_device *bdev, u64 lba, u8 * buffer, size_t count) in read_lba() argument 192 if (!bdev || !buffer || lba > last_lba(bdev)) in read_lba() 198 unsigned char *data = read_dev_sector(bdev, lba++, §); in read_lba() 222 alloc_read_gpt_entries(struct block_device *bdev, gpt_header *gpt) in alloc_read_gpt_entries() argument 226 if (!bdev || !gpt) in alloc_read_gpt_entries() 237 if (read_lba(bdev, le64_to_cpu(gpt->partition_entry_lba), in alloc_read_gpt_entries() 257 alloc_read_gpt_header(struct block_device *bdev, u64 lba) in alloc_read_gpt_header() argument [all …]
|
D | acorn.c | 74 riscix_partition(struct parsed_partitions *state, struct block_device *bdev, in riscix_partition() argument 80 rr = (struct riscix_record *)read_dev_sector(bdev, first_sect, §); in riscix_partition() 127 linux_partition(struct parsed_partitions *state, struct block_device *bdev, in linux_partition() argument 138 linuxp = (struct linux_part *)read_dev_sector(bdev, first_sect, §); in linux_partition() 161 adfspart_check_CUMANA(struct parsed_partitions *state, struct block_device *bdev) in adfspart_check_CUMANA() argument 188 data = read_dev_sector(bdev, start_blk * 2 + 6, §); in adfspart_check_CUMANA() 220 slot = riscix_partition(state, bdev, first_sector, in adfspart_check_CUMANA() 226 slot = linux_partition(state, bdev, first_sector, in adfspart_check_CUMANA() 253 adfspart_check_ADFS(struct parsed_partitions *state, struct block_device *bdev) in adfspart_check_ADFS() argument 262 data = read_dev_sector(bdev, 6, §); in adfspart_check_ADFS() [all …]
|
D | msdos.c | 64 static int aix_magic_present(unsigned char *p, struct block_device *bdev) in aix_magic_present() argument 85 d = read_dev_sector(bdev, 7, §); in aix_magic_present() 106 parse_extended(struct parsed_partitions *state, struct block_device *bdev, in parse_extended() argument 113 int sector_size = bdev_hardsect_size(bdev) / 512; in parse_extended() 126 data = read_dev_sector(bdev, this_sector, §); in parse_extended() 199 parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev, in parse_solaris_x86() argument 208 v = (struct solaris_x86_vtoc *)read_dev_sector(bdev, offset+1, §); in parse_solaris_x86() 246 parse_bsd(struct parsed_partitions *state, struct block_device *bdev, in parse_bsd() argument 254 l = (struct bsd_disklabel *)read_dev_sector(bdev, offset+1, §); in parse_bsd() 292 parse_freebsd(struct parsed_partitions *state, struct block_device *bdev, in parse_freebsd() argument [all …]
|
D | acorn.h | 10 int adfspart_check_CUMANA(struct parsed_partitions *state, struct block_device *bdev); 11 int adfspart_check_ADFS(struct parsed_partitions *state, struct block_device *bdev); 12 int adfspart_check_ICS(struct parsed_partitions *state, struct block_device *bdev); 13 int adfspart_check_POWERTEC(struct parsed_partitions *state, struct block_device *bdev); 14 int adfspart_check_EESOX(struct parsed_partitions *state, struct block_device *bdev);
|
D | ibm.c | 44 ibm_partition(struct parsed_partitions *state, struct block_device *bdev) in ibm_partition() argument 60 blocksize = bdev_hardsect_size(bdev); in ibm_partition() 63 i_size = i_size_read(bdev->bd_inode); in ibm_partition() 77 if (ioctl_by_bdev(bdev, BIODASDINFO2, (unsigned long)info) != 0 || in ibm_partition() 78 ioctl_by_bdev(bdev, HDIO_GETGEO, (unsigned long)geo) != 0) in ibm_partition() 84 data = read_dev_sector(bdev, info->label_block*(blocksize/512), §); in ibm_partition() 157 data = read_dev_sector(bdev, blk * (blocksize/512), in ibm_partition() 171 data = read_dev_sector(bdev, blk * in ibm_partition() 192 data = read_dev_sector(bdev, in ibm_partition()
|
D | check.c | 135 const char *bdevname(struct block_device *bdev, char *buf) in bdevname() argument 137 return disk_name(bdev->bd_disk, bdev->bd_part->partno, buf); in bdevname() 157 check_partition(struct gendisk *hd, struct block_device *bdev) in check_partition() argument 175 res = check_part[i++](state, bdev); in check_partition() 458 struct block_device *bdev; in register_disk() local 491 bdev = bdget_disk(disk, 0); in register_disk() 492 if (!bdev) in register_disk() 495 bdev->bd_invalidated = 1; in register_disk() 496 err = blkdev_get(bdev, FMODE_READ); in register_disk() 499 blkdev_put(bdev, FMODE_READ); in register_disk() [all …]
|
D | amiga.c | 27 amiga_partition(struct parsed_partitions *state, struct block_device *bdev) in amiga_partition() argument 41 data = read_dev_sector(bdev, blk, §); in amiga_partition() 45 bdevname(bdev, b), blk); in amiga_partition() 67 bdevname(bdev, b), blk); in amiga_partition() 78 data = read_dev_sector(bdev, blk, §); in amiga_partition() 82 bdevname(bdev, b), blk); in amiga_partition()
|
D | mac.c | 30 int mac_partition(struct parsed_partitions *state, struct block_device *bdev) in mac_partition() argument 45 md = (struct mac_driver_desc *) read_dev_sector(bdev, 0, §); in mac_partition() 54 data = read_dev_sector(bdev, secsize/512, §); in mac_partition() 67 data = read_dev_sector(bdev, pos/512, §); in mac_partition() 126 note_bootable_part(bdev->bd_dev, found_root, found_root_goodness); in mac_partition()
|
D | ldm.c | 324 static bool ldm_validate_privheads (struct block_device *bdev, in ldm_validate_privheads() argument 335 BUG_ON (!bdev || !ph1); in ldm_validate_privheads() 349 data = read_dev_sector (bdev, in ldm_validate_privheads() 366 num_sects = bdev->bd_inode->i_size >> 9; in ldm_validate_privheads() 412 static bool ldm_validate_tocblocks(struct block_device *bdev, in ldm_validate_tocblocks() argument 423 BUG_ON(!bdev || !ldb); in ldm_validate_tocblocks() 440 data = read_dev_sector(bdev, base + off[i], §); in ldm_validate_tocblocks() 486 static bool ldm_validate_vmdb (struct block_device *bdev, unsigned long base, in ldm_validate_vmdb() argument 495 BUG_ON (!bdev || !ldb); in ldm_validate_vmdb() 500 data = read_dev_sector (bdev, base + OFF_VMDB, §); in ldm_validate_vmdb() [all …]
|
D | atari.c | 33 int atari_partition(struct parsed_partitions *state, struct block_device *bdev) in atari_partition() argument 45 rs = (struct rootsector *) read_dev_sector(bdev, 0, §); in atari_partition() 50 hd_size = bdev->bd_inode->i_size >> 9; in atari_partition() 87 xrs = (struct rootsector *)read_dev_sector(bdev, partsect, §2); in atari_partition()
|
D | sysv68.c | 49 int sysv68_partition(struct parsed_partitions *state, struct block_device *bdev) in sysv68_partition() argument 58 data = read_dev_sector(bdev, 0, §); in sysv68_partition() 71 data = read_dev_sector(bdev, i, §); in sysv68_partition()
|
D | sgi.c | 30 int sgi_partition(struct parsed_partitions *state, struct block_device *bdev) in sgi_partition() argument 42 label = (struct sgi_disklabel *) read_dev_sector(bdev, 0, §); in sgi_partition() 60 bdevname(bdev, b)); in sgi_partition()
|
D | sun.c | 13 int sun_partition(struct parsed_partitions *state, struct block_device *bdev) in sun_partition() argument 64 label = (struct sun_disklabel *)read_dev_sector(bdev, 0, §); in sun_partition() 81 bdevname(bdev, b)); in sun_partition()
|
D | ultrix.c | 12 int ultrix_partition(struct parsed_partitions *state, struct block_device *bdev) in ultrix_partition() argument 29 data = read_dev_sector(bdev, (16384 - sizeof(*label))/512, §); in ultrix_partition()
|
D | karma.c | 12 int karma_partition(struct parsed_partitions *state, struct block_device *bdev) in karma_partition() argument 32 data = read_dev_sector(bdev, 0, §); in karma_partition()
|
/fs/udf/ |
D | lowlevel.c | 32 struct block_device *bdev = sb->s_bdev; in udf_get_last_session() local 37 i = ioctl_by_bdev(bdev, CDROMMULTISESSION, (unsigned long)&ms_info); in udf_get_last_session() 56 struct block_device *bdev = sb->s_bdev; in udf_get_last_block() local 59 if (ioctl_by_bdev(bdev, CDROM_LAST_WRITTEN, (unsigned long) &lblock)) in udf_get_last_block() 60 lblock = bdev->bd_inode->i_size >> sb->s_blocksize_bits; in udf_get_last_block()
|
/fs/btrfs/ |
D | volumes.c | 149 bdi = device->bdev->bd_inode->i_mapping->backing_dev_info; in run_scheduled_bios() 358 if (device->bdev) { in btrfs_close_extra_devices() 359 close_bdev_exclusive(device->bdev, device->mode); in btrfs_close_extra_devices() 360 device->bdev = NULL; in btrfs_close_extra_devices() 391 if (device->bdev) { in __btrfs_close_devices() 392 close_bdev_exclusive(device->bdev, device->mode); in __btrfs_close_devices() 400 device->bdev = NULL; in __btrfs_close_devices() 437 struct block_device *bdev; in __btrfs_open_devices() local 450 if (device->bdev) in __btrfs_open_devices() 455 bdev = open_bdev_exclusive(device->name, flags, holder); in __btrfs_open_devices() [all …]
|
D | compression.c | 92 static struct bio *compressed_bio_alloc(struct block_device *bdev, in compressed_bio_alloc() argument 98 nr_vecs = bio_get_nr_vecs(bdev); in compressed_bio_alloc() 108 bio->bi_bdev = bdev; in compressed_bio_alloc() 350 struct block_device *bdev; in btrfs_submit_compressed_write() local 366 bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; in btrfs_submit_compressed_write() 368 bio = compressed_bio_alloc(bdev, first_byte, GFP_NOFS); in btrfs_submit_compressed_write() 408 bio = compressed_bio_alloc(bdev, first_byte, GFP_NOFS); in btrfs_submit_compressed_write() 584 struct block_device *bdev; in btrfs_submit_compressed_read() local 626 bdev = BTRFS_I(inode)->root->fs_info->fs_devices->latest_bdev; in btrfs_submit_compressed_read() 640 comp_bio = compressed_bio_alloc(bdev, cur_disk_byte, GFP_NOFS); in btrfs_submit_compressed_read() [all …]
|
/fs/ext2/ |
D | xip.c | 22 struct block_device *bdev = inode->i_sb->s_bdev; in __inode_direct_access() local 23 struct block_device_operations *ops = bdev->bd_disk->fops; in __inode_direct_access() 29 return ops->direct_access(bdev, sector, kaddr, pfn); in __inode_direct_access()
|
/fs/jfs/ |
D | jfs_logmgr.c | 1081 struct block_device *bdev; in lmLogOpen() local 1093 if (log->bdev->bd_dev == sbi->logdev) { in lmLogOpen() 1124 bdev = open_by_devnum(sbi->logdev, FMODE_READ|FMODE_WRITE); in lmLogOpen() 1125 if (IS_ERR(bdev)) { in lmLogOpen() 1126 rc = -PTR_ERR(bdev); in lmLogOpen() 1130 if ((rc = bd_claim(bdev, log))) { in lmLogOpen() 1134 log->bdev = bdev; in lmLogOpen() 1168 bd_release(bdev); in lmLogOpen() 1171 blkdev_put(bdev, FMODE_READ|FMODE_WRITE); in lmLogOpen() 1192 log->bdev = sb->s_bdev; in open_inline_log() [all …]
|