Home
last modified time | relevance | path

Searched refs:bdev (Results 1 – 25 of 61) 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 static void kill_bdev(struct block_device *bdev) in kill_bdev() argument
80 struct address_space *mapping = bdev->bd_inode->i_mapping; in kill_bdev()
90 void invalidate_bdev(struct block_device *bdev) in invalidate_bdev() argument
92 struct address_space *mapping = bdev->bd_inode->i_mapping; in invalidate_bdev()
110 int truncate_bdev_range(struct block_device *bdev, fmode_t mode, in truncate_bdev_range() argument
[all …]
Dsuper.c744 static struct super_block *__get_super(struct block_device *bdev, bool excl) in __get_super() argument
748 if (!bdev) in __get_super()
756 if (sb->s_bdev == bdev) { in __get_super()
787 struct super_block *get_super(struct block_device *bdev) in get_super() argument
789 return __get_super(bdev, false); in get_super()
793 static struct super_block *__get_super_thawed(struct block_device *bdev, in __get_super_thawed() argument
797 struct super_block *s = __get_super(bdev, excl); in __get_super_thawed()
819 struct super_block *get_super_thawed(struct block_device *bdev) in get_super_thawed() argument
821 return __get_super_thawed(bdev, false); in get_super_thawed()
834 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()
531 struct block_device *bdev = NULL; in __mpage_writepage() local
576 bdev = bh->b_bdev; in __mpage_writepage()
616 bdev = map_bh.b_bdev; in __mpage_writepage()
[all …]
Dbuffer.c189 __find_get_block_slow(struct block_device *bdev, sector_t block) in __find_get_block_slow() argument
191 struct inode *bd_inode = bdev->bd_inode; in __find_get_block_slow()
234 bh->b_state, bh->b_size, bdev, in __find_get_block_slow()
559 void write_boundary_block(struct block_device *bdev, in write_boundary_block() argument
562 struct buffer_head *bh = __find_get_block(bdev, bblock + 1, blocksize); in write_boundary_block()
903 static sector_t blkdev_max_block(struct block_device *bdev, unsigned int size) in blkdev_max_block() argument
906 loff_t sz = i_size_read(bdev->bd_inode); in blkdev_max_block()
919 init_page_buffers(struct page *page, struct block_device *bdev, in init_page_buffers() argument
925 sector_t end_block = blkdev_max_block(I_BDEV(bdev->bd_inode), size); in init_page_buffers()
931 bh->b_bdev = bdev; in init_page_buffers()
[all …]
Dsync.c86 static void fdatawrite_one_bdev(struct block_device *bdev, void *arg) in fdatawrite_one_bdev() argument
88 filemap_fdatawrite(bdev->bd_inode->i_mapping); in fdatawrite_one_bdev()
91 static void fdatawait_one_bdev(struct block_device *bdev, void *arg) in fdatawait_one_bdev() argument
98 filemap_fdatawait_keep_errors(bdev->bd_inode->i_mapping); in fdatawait_one_bdev()
Ddirect-io.c392 struct block_device *bdev, in dio_bio_alloc() argument
407 bio_set_dev(bio, bdev); in dio_bio_alloc()
1141 struct block_device *bdev, struct iov_iter *iter, in do_blockdev_direct_IO() argument
1191 if (bdev) in do_blockdev_direct_IO()
1192 blkbits = blksize_bits(bdev_logical_block_size(bdev)); in do_blockdev_direct_IO()
1362 struct block_device *bdev, struct iov_iter *iter, in __blockdev_direct_IO() argument
1375 prefetch(&bdev->bd_disk->part_tbl); in __blockdev_direct_IO()
1376 prefetch(bdev->bd_disk->queue); in __blockdev_direct_IO()
1377 prefetch((char *)bdev->bd_disk->queue + SMP_CACHE_BYTES); in __blockdev_direct_IO()
1379 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);
34 static inline int __sync_blockdev(struct block_device *bdev, int wait) in __sync_blockdev() argument
/fs/pstore/
Dblk.c222 struct block_device *bdev = ERR_PTR(-ENODEV); in psblk_get_bdev() local
236 bdev = blkdev_get_by_path(blkdev, mode, holder); in psblk_get_bdev()
237 if (IS_ERR(bdev)) { in psblk_get_bdev()
243 bdev = blkdev_get_by_dev(devt, mode, holder); in psblk_get_bdev()
244 if (IS_ERR(bdev)) in psblk_get_bdev()
245 return bdev; in psblk_get_bdev()
248 nr_sects = part_nr_sects_read(bdev->bd_part); in psblk_get_bdev()
251 blkdev_put(bdev, mode); in psblk_get_bdev()
256 info->devt = bdev->bd_dev; in psblk_get_bdev()
258 info->start_sect = get_start_sect(bdev); in psblk_get_bdev()
[all …]
/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/btrfs/
Dcheck-integrity.c184 struct block_device *bdev; member
261 struct block_device *bdev,
454 ds->bdev = NULL; in btrfsic_dev_state_init()
495 ((unsigned int)((uintptr_t)b->dev_state->bdev))) & in btrfsic_block_hashtable_add()
507 struct block_device *bdev, in btrfsic_block_hashtable_lookup() argument
513 ((unsigned int)((uintptr_t)bdev))) & in btrfsic_block_hashtable_lookup()
518 if (b->dev_state->bdev == bdev && b->dev_bytenr == dev_bytenr) in btrfsic_block_hashtable_lookup()
541 ((unsigned int)((uintptr_t)l->block_ref_to->dev_state->bdev)) ^ in btrfsic_block_link_hashtable_add()
542 ((unsigned int)((uintptr_t)l->block_ref_from->dev_state->bdev))) in btrfsic_block_link_hashtable_add()
573 if (l->block_ref_to->dev_state->bdev == bdev_ref_to && in btrfsic_block_link_hashtable_lookup()
[all …]
Dvolumes.c510 int flush, struct block_device **bdev, in btrfs_get_bdev_and_sb() argument
515 *bdev = blkdev_get_by_path(device_path, flags, holder); in btrfs_get_bdev_and_sb()
517 if (IS_ERR(*bdev)) { in btrfs_get_bdev_and_sb()
518 ret = PTR_ERR(*bdev); in btrfs_get_bdev_and_sb()
523 filemap_write_and_wait((*bdev)->bd_inode->i_mapping); in btrfs_get_bdev_and_sb()
524 ret = set_blocksize(*bdev, BTRFS_BDEV_BLOCKSIZE); in btrfs_get_bdev_and_sb()
526 blkdev_put(*bdev, flags); in btrfs_get_bdev_and_sb()
529 invalidate_bdev(*bdev); in btrfs_get_bdev_and_sb()
530 *disk_super = btrfs_read_dev_super(*bdev); in btrfs_get_bdev_and_sb()
533 blkdev_put(*bdev, flags); in btrfs_get_bdev_and_sb()
[all …]
Ddev-replace.c244 struct block_device *bdev; in btrfs_init_dev_replace_tgtdev() local
255 bdev = blkdev_get_by_path(device_path, FMODE_WRITE | FMODE_EXCL, in btrfs_init_dev_replace_tgtdev()
257 if (IS_ERR(bdev)) { in btrfs_init_dev_replace_tgtdev()
259 return PTR_ERR(bdev); in btrfs_init_dev_replace_tgtdev()
262 sync_blockdev(bdev); in btrfs_init_dev_replace_tgtdev()
265 if (device->bdev == bdev) { in btrfs_init_dev_replace_tgtdev()
274 if (i_size_read(bdev->bd_inode) < in btrfs_init_dev_replace_tgtdev()
308 device->bdev = bdev; in btrfs_init_dev_replace_tgtdev()
313 set_blocksize(device->bdev, BTRFS_BDEV_BLOCKSIZE); in btrfs_init_dev_replace_tgtdev()
326 blkdev_put(bdev, FMODE_EXCL); in btrfs_init_dev_replace_tgtdev()
[all …]
Ddisk-io.h58 struct btrfs_super_block *btrfs_read_dev_super(struct block_device *bdev);
59 struct btrfs_super_block *btrfs_read_dev_one_super(struct block_device *bdev,
/fs/iomap/
Dtrace.h113 __field(dev_t, bdev)
123 __entry->bdev = iomap->bdev ? iomap->bdev->bd_dev : 0;
129 MAJOR(__entry->bdev), MINOR(__entry->bdev),
Ddirect-io.c71 dio->submit.last_queue = bdev_get_queue(iomap->bdev); in iomap_dio_submit_bio()
197 bio_set_dev(bio, iomap->bdev); in iomap_dio_zero()
212 unsigned int blkbits = blksize_bits(bdev_logical_block_size(iomap->bdev)); in iomap_dio_bio_actor()
245 blk_queue_fua(bdev_get_queue(iomap->bdev))) in iomap_dio_bio_actor()
281 bio_set_dev(bio, iomap->bdev); in iomap_dio_bio_actor()
Dswapfile.c116 if (iomap->bdev != isi->sis->bdev) { in iomap_swapfile_activate_actor()
/fs/udf/
Dlowlevel.c50 struct block_device *bdev = sb->s_bdev; in udf_get_last_block() local
51 struct cdrom_device_info *cdi = disk_to_cdi(bdev->bd_disk); in udf_get_last_block()
59 lblock = i_size_read(bdev->bd_inode) >> sb->s_blocksize_bits; in udf_get_last_block()
/fs/f2fs/
Dsegment.c592 struct block_device *bdev) in __submit_flush_wait() argument
594 int ret = blkdev_issue_flush(bdev, GFP_NOFS); in __submit_flush_wait()
596 trace_f2fs_issue_flush(bdev, test_opt(sbi, NOBARRIER), in __submit_flush_wait()
612 ret = __submit_flush_wait(sbi, FDEV(i).bdev); in submit_flush_wait()
790 ret = __submit_flush_wait(sbi, FDEV(i).bdev); in f2fs_flush_device_cache()
994 struct block_device *bdev, block_t lstart, in __create_discard_cmd() argument
1007 dc->bdev = bdev; in __create_discard_cmd()
1026 struct block_device *bdev, block_t lstart, in __attach_discard_cmd() argument
1034 dc = __create_discard_cmd(sbi, bdev, lstart, start, len); in __attach_discard_cmd()
1063 trace_f2fs_remove_discard(dc->bdev, dc->start, dc->len); in __remove_discard_cmd()
[all …]
/fs/nilfs2/
Dsuper.c1220 struct block_device *bdev; member
1310 sd.bdev = blkdev_get_by_path(dev_name, mode, fs_type); in nilfs_mount()
1311 if (IS_ERR(sd.bdev)) in nilfs_mount()
1312 return ERR_CAST(sd.bdev); in nilfs_mount()
1326 mutex_lock(&sd.bdev->bd_fsfreeze_mutex); in nilfs_mount()
1327 if (sd.bdev->bd_fsfreeze_count > 0) { in nilfs_mount()
1328 mutex_unlock(&sd.bdev->bd_fsfreeze_mutex); in nilfs_mount()
1333 sd.bdev); in nilfs_mount()
1334 mutex_unlock(&sd.bdev->bd_fsfreeze_mutex); in nilfs_mount()
1345 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()
1447 struct block_device *bdev; in lmLogClose() local
1493 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/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.c868 struct block_device *bdev; in quotactl_block() local
874 bdev = lookup_bdev(tmp->name); in quotactl_block()
876 if (IS_ERR(bdev)) in quotactl_block()
877 return ERR_CAST(bdev); in quotactl_block()
879 sb = get_super_exclusive_thawed(bdev); in quotactl_block()
881 sb = get_super_thawed(bdev); in quotactl_block()
883 sb = get_super(bdev); in quotactl_block()
884 bdput(bdev); in quotactl_block()

123