Home
last modified time | relevance | path

Searched refs:bdev (Results 1 – 25 of 62) sorted by relevance

123

/fs/
Dblock_dev.c40 struct block_device bdev; member
53 return &BDEV_I(inode)->bdev; in I_BDEV()
57 static void bdev_write_inode(struct block_device *bdev) in bdev_write_inode() argument
59 struct inode *inode = bdev->bd_inode; in bdev_write_inode()
70 bdevname(bdev, name), ret); in bdev_write_inode()
78 void kill_bdev(struct block_device *bdev) in kill_bdev() argument
80 struct address_space *mapping = bdev->bd_inode->i_mapping; in kill_bdev()
91 void invalidate_bdev(struct block_device *bdev) in invalidate_bdev() argument
93 struct address_space *mapping = bdev->bd_inode->i_mapping; in invalidate_bdev()
107 static void set_init_blocksize(struct block_device *bdev) in set_init_blocksize() argument
[all …]
Dsuper.c743 static struct super_block *__get_super(struct block_device *bdev, bool excl) in __get_super() argument
747 if (!bdev) in __get_super()
755 if (sb->s_bdev == bdev) { in __get_super()
786 struct super_block *get_super(struct block_device *bdev) in get_super() argument
788 return __get_super(bdev, false); in get_super()
792 static struct super_block *__get_super_thawed(struct block_device *bdev, in __get_super_thawed() argument
796 struct super_block *s = __get_super(bdev, excl); in __get_super_thawed()
818 struct super_block *get_super_thawed(struct block_device *bdev) in get_super_thawed() argument
820 return __get_super_thawed(bdev, false); in get_super_thawed()
833 struct super_block *get_super_exclusive_thawed(struct block_device *bdev) in get_super_exclusive_thawed() argument
[all …]
Dmpage.c107 mpage_alloc(struct block_device *bdev, in mpage_alloc() argument
123 bio_set_dev(bio, bdev); in mpage_alloc()
206 struct block_device *bdev = NULL; in do_mpage_readpage() local
254 bdev = map_bh->b_bdev; in do_mpage_readpage()
309 bdev = map_bh->b_bdev; in do_mpage_readpage()
338 if (!bdev_read_page(bdev, blocks[0] << (blkbits - 9), in do_mpage_readpage()
342 args->bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9), in do_mpage_readpage()
547 struct block_device *bdev = NULL; in __mpage_writepage() local
592 bdev = bh->b_bdev; in __mpage_writepage()
632 bdev = map_bh.b_bdev; in __mpage_writepage()
[all …]
Dbuffer.c195 __find_get_block_slow(struct block_device *bdev, sector_t block) in __find_get_block_slow() argument
197 struct inode *bd_inode = bdev->bd_inode; in __find_get_block_slow()
240 bh->b_state, bh->b_size, bdev, in __find_get_block_slow()
535 void write_boundary_block(struct block_device *bdev, in write_boundary_block() argument
538 struct buffer_head *bh = __find_get_block(bdev, bblock + 1, blocksize); in write_boundary_block()
879 static sector_t blkdev_max_block(struct block_device *bdev, unsigned int size) in blkdev_max_block() argument
882 loff_t sz = i_size_read(bdev->bd_inode); in blkdev_max_block()
895 init_page_buffers(struct page *page, struct block_device *bdev, in init_page_buffers() argument
901 sector_t end_block = blkdev_max_block(I_BDEV(bdev->bd_inode), size); in init_page_buffers()
907 bh->b_bdev = bdev; in init_page_buffers()
[all …]
Ddax.c683 static int copy_user_dax(struct block_device *bdev, struct dax_device *dax_dev, in copy_user_dax() argument
692 rc = bdev_dax_pgoff(bdev, sector, size, &pgoff); in copy_user_dax()
940 struct block_device *bdev, struct writeback_control *wbc) in dax_writeback_mapping_range() argument
956 dax_dev = dax_get_by_host(bdev->bd_disk->disk_name); in dax_writeback_mapping_range()
999 rc = bdev_dax_pgoff(iomap->bdev, sector, size, &pgoff); in dax_iomap_pfn()
1047 static bool dax_range_is_aligned(struct block_device *bdev, in dax_range_is_aligned() argument
1050 unsigned short sector_size = bdev_logical_block_size(bdev); in dax_range_is_aligned()
1060 int __dax_zero_page_range(struct block_device *bdev, in __dax_zero_page_range() argument
1064 if (dax_range_is_aligned(bdev, offset, size)) { in __dax_zero_page_range()
1067 return blkdev_issue_zeroout(bdev, start_sector, in __dax_zero_page_range()
[all …]
Dsync.c83 static void fdatawrite_one_bdev(struct block_device *bdev, void *arg) in fdatawrite_one_bdev() argument
85 filemap_fdatawrite(bdev->bd_inode->i_mapping); in fdatawrite_one_bdev()
88 static void fdatawait_one_bdev(struct block_device *bdev, void *arg) in fdatawait_one_bdev() argument
95 filemap_fdatawait_keep_errors(bdev->bd_inode->i_mapping); in fdatawait_one_bdev()
Ddirect-io.c430 struct block_device *bdev, in dio_bio_alloc() argument
445 bio_set_dev(bio, bdev); in dio_bio_alloc()
1170 struct block_device *bdev, struct iov_iter *iter, in do_blockdev_direct_IO() argument
1193 if (bdev) in do_blockdev_direct_IO()
1194 blkbits = blksize_bits(bdev_logical_block_size(bdev)); in do_blockdev_direct_IO()
1400 struct block_device *bdev, struct iov_iter *iter, in __blockdev_direct_IO() argument
1413 prefetch(&bdev->bd_disk->part_tbl); in __blockdev_direct_IO()
1414 prefetch(bdev->bd_queue); in __blockdev_direct_IO()
1415 prefetch((char *)bdev->bd_queue + SMP_CACHE_BYTES); in __blockdev_direct_IO()
1417 return do_blockdev_direct_IO(iocb, inode, bdev, iter, get_block, in __blockdev_direct_IO()
Dinternal.h25 extern int __sync_blockdev(struct block_device *bdev, int wait);
32 static inline int __sync_blockdev(struct block_device *bdev, int wait) in __sync_blockdev() argument
/fs/nfs/blocklayout/
Ddev.c28 dev->bdev->bd_disk->fops->pr_ops; in bl_free_device()
31 error = ops->pr_register(dev->bdev, dev->pr_key, 0, in bl_free_device()
37 if (dev->bdev) in bl_free_device()
38 blkdev_put(dev->bdev, FMODE_READ | FMODE_WRITE); in bl_free_device()
172 map->bdev = dev->bdev; in bl_map_simple()
239 struct block_device *bdev; in bl_parse_simple() local
246 bdev = blkdev_get_by_dev(dev, FMODE_READ | FMODE_WRITE, NULL); in bl_parse_simple()
247 if (IS_ERR(bdev)) { in bl_parse_simple()
249 MAJOR(dev), MINOR(dev), PTR_ERR(bdev)); in bl_parse_simple()
250 return PTR_ERR(bdev); in bl_parse_simple()
[all …]
Dblocklayout.h98 struct block_device *bdev; member
111 struct block_device *bdev; member
/fs/udf/
Dlowlevel.c32 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()
52 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()
61 lblock = i_size_read(bdev->bd_inode) >> sb->s_blocksize_bits; in udf_get_last_block()
/fs/btrfs/
Dcheck-integrity.c188 struct block_device *bdev; member
265 struct block_device *bdev,
460 ds->bdev = NULL; in btrfsic_dev_state_init()
501 ((unsigned int)((uintptr_t)b->dev_state->bdev))) & in btrfsic_block_hashtable_add()
513 struct block_device *bdev, in btrfsic_block_hashtable_lookup() argument
519 ((unsigned int)((uintptr_t)bdev))) & in btrfsic_block_hashtable_lookup()
524 if (b->dev_state->bdev == bdev && b->dev_bytenr == dev_bytenr) in btrfsic_block_hashtable_lookup()
547 ((unsigned int)((uintptr_t)l->block_ref_to->dev_state->bdev)) ^ in btrfsic_block_link_hashtable_add()
548 ((unsigned int)((uintptr_t)l->block_ref_from->dev_state->bdev))) in btrfsic_block_link_hashtable_add()
579 if (l->block_ref_to->dev_state->bdev == bdev_ref_to && in btrfsic_block_link_hashtable_lookup()
[all …]
Dvolumes.c469 int flush, struct block_device **bdev, in btrfs_get_bdev_and_sb() argument
474 *bdev = blkdev_get_by_path(device_path, flags, holder); in btrfs_get_bdev_and_sb()
476 if (IS_ERR(*bdev)) { in btrfs_get_bdev_and_sb()
477 ret = PTR_ERR(*bdev); in btrfs_get_bdev_and_sb()
482 filemap_write_and_wait((*bdev)->bd_inode->i_mapping); in btrfs_get_bdev_and_sb()
483 ret = set_blocksize(*bdev, BTRFS_BDEV_BLOCKSIZE); in btrfs_get_bdev_and_sb()
485 blkdev_put(*bdev, flags); in btrfs_get_bdev_and_sb()
488 invalidate_bdev(*bdev); in btrfs_get_bdev_and_sb()
489 *bh = btrfs_read_dev_super(*bdev); in btrfs_get_bdev_and_sb()
492 blkdev_put(*bdev, flags); in btrfs_get_bdev_and_sb()
[all …]
Ddev-replace.c186 struct block_device *bdev; in btrfs_init_dev_replace_tgtdev() local
198 bdev = blkdev_get_by_path(device_path, FMODE_WRITE | FMODE_EXCL, in btrfs_init_dev_replace_tgtdev()
200 if (IS_ERR(bdev)) { in btrfs_init_dev_replace_tgtdev()
202 return PTR_ERR(bdev); in btrfs_init_dev_replace_tgtdev()
205 sync_blockdev(bdev); in btrfs_init_dev_replace_tgtdev()
209 if (device->bdev == bdev) { in btrfs_init_dev_replace_tgtdev()
218 if (i_size_read(bdev->bd_inode) < in btrfs_init_dev_replace_tgtdev()
252 device->bdev = bdev; in btrfs_init_dev_replace_tgtdev()
257 set_blocksize(device->bdev, BTRFS_BDEV_BLOCKSIZE); in btrfs_init_dev_replace_tgtdev()
270 blkdev_put(bdev, FMODE_EXCL); in btrfs_init_dev_replace_tgtdev()
[all …]
Dsysfs.c936 if (one_device && one_device->bdev) { in btrfs_sysfs_rm_device_link()
937 disk = one_device->bdev->bd_part; in btrfs_sysfs_rm_device_link()
949 if (!one_device->bdev) in btrfs_sysfs_rm_device_link()
951 disk = one_device->bdev->bd_part; in btrfs_sysfs_rm_device_link()
983 if (!dev->bdev) in btrfs_sysfs_add_device_link()
989 disk = dev->bdev->bd_part; in btrfs_sysfs_add_device_link()
1001 void btrfs_kobject_uevent(struct block_device *bdev, enum kobject_action action) in btrfs_kobject_uevent() argument
1005 ret = kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, action); in btrfs_kobject_uevent()
1008 action, kobject_name(&disk_to_dev(bdev->bd_disk)->kobj), in btrfs_kobject_uevent()
1009 &disk_to_dev(bdev->bd_disk)->kobj); in btrfs_kobject_uevent()
Dcompression.c323 struct block_device *bdev; in btrfs_submit_compressed_write() local
342 bdev = fs_info->fs_devices->latest_bdev; in btrfs_submit_compressed_write()
345 bio_set_dev(bio, bdev); in btrfs_submit_compressed_write()
388 bio_set_dev(bio, bdev); in btrfs_submit_compressed_write()
556 struct block_device *bdev; in btrfs_submit_compressed_read() local
607 bdev = fs_info->fs_devices->latest_bdev; in btrfs_submit_compressed_read()
627 bio_set_dev(comp_bio, bdev); in btrfs_submit_compressed_read()
678 bio_set_dev(comp_bio, bdev); in btrfs_submit_compressed_read()
/fs/f2fs/
Dsegment.c559 struct block_device *bdev) in __submit_flush_wait() argument
569 bio_set_dev(bio, bdev); in __submit_flush_wait()
573 trace_f2fs_issue_flush(bdev, test_opt(sbi, NOBARRIER), in __submit_flush_wait()
589 ret = __submit_flush_wait(sbi, FDEV(i).bdev); in submit_flush_wait()
764 ret = __submit_flush_wait(sbi, FDEV(i).bdev); in f2fs_flush_device_cache()
935 struct block_device *bdev, block_t lstart, in __create_discard_cmd() argument
948 dc->bdev = bdev; in __create_discard_cmd()
967 struct block_device *bdev, block_t lstart, in __attach_discard_cmd() argument
975 dc = __create_discard_cmd(sbi, bdev, lstart, start, len); in __attach_discard_cmd()
1004 trace_f2fs_remove_discard(dc->bdev, dc->start, dc->len); in __remove_discard_cmd()
[all …]
/fs/nilfs2/
Dsuper.c1186 struct block_device *bdev; member
1276 sd.bdev = blkdev_get_by_path(dev_name, mode, fs_type); in nilfs_mount()
1277 if (IS_ERR(sd.bdev)) in nilfs_mount()
1278 return ERR_CAST(sd.bdev); in nilfs_mount()
1292 mutex_lock(&sd.bdev->bd_fsfreeze_mutex); in nilfs_mount()
1293 if (sd.bdev->bd_fsfreeze_count > 0) { in nilfs_mount()
1294 mutex_unlock(&sd.bdev->bd_fsfreeze_mutex); in nilfs_mount()
1299 sd.bdev); in nilfs_mount()
1300 mutex_unlock(&sd.bdev->bd_fsfreeze_mutex); in nilfs_mount()
1311 snprintf(s->s_id, sizeof(s->s_id), "%pg", sd.bdev); in nilfs_mount()
[all …]
/fs/nfsd/
Dblocklayout.c214 static int nfsd4_scsi_identify_device(struct block_device *bdev, in nfsd4_scsi_identify_device() argument
217 struct request_queue *q = bdev->bd_disk->queue; in nfsd4_scsi_identify_device()
408 struct block_device *bdev = ls->ls_file->nf_file->f_path.mnt->mnt_sb->s_bdev; in nfsd4_scsi_fence_client() local
410 bdev->bd_disk->fops->pr_ops->pr_preempt(bdev, NFSD_MDS_PR_KEY, in nfsd4_scsi_fence_client()
/fs/jfs/
Djfs_logmgr.c1069 struct block_device *bdev; in lmLogOpen() local
1081 if (log->bdev->bd_dev == sbi->logdev) { in lmLogOpen()
1111 bdev = blkdev_get_by_dev(sbi->logdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL, in lmLogOpen()
1113 if (IS_ERR(bdev)) { in lmLogOpen()
1114 rc = PTR_ERR(bdev); in lmLogOpen()
1118 log->bdev = bdev; in lmLogOpen()
1152 blkdev_put(bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL); in lmLogOpen()
1173 log->bdev = sb->s_bdev; in open_inline_log()
1446 struct block_device *bdev; in lmLogClose() local
1492 bdev = log->bdev; in lmLogClose()
[all …]
/fs/xfs/
Dxfs_bio_io.c14 struct block_device *bdev, in xfs_rw_bdev() argument
30 bio_set_dev(bio, bdev); in xfs_rw_bdev()
/fs/iomap/
Ddirect-io.c70 dio->submit.last_queue = bdev_get_queue(iomap->bdev); in iomap_dio_submit_bio()
190 bio_set_dev(bio, iomap->bdev); in iomap_dio_zero()
205 unsigned int blkbits = blksize_bits(bdev_logical_block_size(iomap->bdev)); in iomap_dio_bio_actor()
238 blk_queue_fua(bdev_get_queue(iomap->bdev))) in iomap_dio_bio_actor()
270 bio_set_dev(bio, iomap->bdev); in iomap_dio_bio_actor()
Dswapfile.c109 if (iomap->bdev != isi->sis->bdev) { in iomap_swapfile_activate_actor()
/fs/jbd2/
Drevoke.c331 struct block_device *bdev; in jbd2_journal_revoke() local
344 bdev = journal->j_fs_dev; in jbd2_journal_revoke()
348 bh = __find_get_block(bdev, blocknr, journal->j_blocksize); in jbd2_journal_revoke()
358 bh2 = __find_get_block(bdev, blocknr, journal->j_blocksize); in jbd2_journal_revoke()
/fs/quota/
Dquota.c791 struct block_device *bdev; in quotactl_block() local
797 bdev = lookup_bdev(tmp->name); in quotactl_block()
799 if (IS_ERR(bdev)) in quotactl_block()
800 return ERR_CAST(bdev); in quotactl_block()
802 sb = get_super_exclusive_thawed(bdev); in quotactl_block()
804 sb = get_super_thawed(bdev); in quotactl_block()
806 sb = get_super(bdev); in quotactl_block()
807 bdput(bdev); in quotactl_block()

123