Home
last modified time | relevance | path

Searched refs:bdev_file (Results 1 – 25 of 30) sorted by relevance

12

/linux/fs/nfs/blocklayout/
H A Ddev.c21 struct block_device *bdev = file_bdev(dev->bdev_file); in bl_unregister_scsi()
34 struct block_device *bdev = file_bdev(dev->bdev_file); in bl_register_scsi()
108 } else if (dev->bdev_file) { in bl_free_deviceid_node()
109 fput(dev->bdev_file); in bl_free_deviceid_node()
110 dev->bdev_file = NULL; in bl_free_deviceid_node()
244 map->bdev = file_bdev(dev->bdev_file); in bl_map_concat()
312 struct file *bdev_file; in bl_parse_simple()
319 bdev_file = bdev_file_open_by_dev(dev, BLK_OPEN_READ | BLK_OPEN_WRITE, in bl_parse_simple()
321 if (IS_ERR(bdev_file)) { in bl_parse_simple()
323 MAJOR(dev), MINOR(dev), PTR_ERR(bdev_file));
301 struct file *bdev_file; bl_parse_simple() local
368 struct file *bdev_file; bl_open_path() local
403 struct file *bdev_file; bl_parse_scsi() local
[all...]
H A Dblocklayout.h112 struct file *bdev_file; member
/linux/drivers/mtd/devices/
H A Dblock2mtd.c40 struct file *bdev_file; member
58 struct address_space *mapping = dev->bdev_file->f_mapping; in _block2mtd_erase()
108 struct address_space *mapping = dev->bdev_file->f_mapping; in block2mtd_read()
143 struct address_space *mapping = dev->bdev_file->f_mapping; in _block2mtd_write()
198 sync_blockdev(file_bdev(dev->bdev_file)); in block2mtd_sync()
210 if (dev->bdev_file) { in block2mtd_free_device()
211 invalidate_mapping_pages(dev->bdev_file->f_mapping, 0, -1); in block2mtd_free_device()
212 bdev_fput(dev->bdev_file); in block2mtd_free_device()
225 struct file *bdev_file = ERR_PTR(-ENODEV); in mdtblock_early_get_bdev() local
233 return bdev_file; in mdtblock_early_get_bdev()
[all …]
/linux/block/
H A Dbdev.c57 struct block_device *file_bdev(struct file *bdev_file) in file_bdev() argument
59 return I_BDEV(bdev_file->f_mapping->host); in file_bdev()
931 static inline bool bdev_unclaimed(const struct file *bdev_file) in bdev_unclaimed() argument
933 return bdev_file->private_data == BDEV_I(bdev_file->f_mapping->host); in bdev_unclaimed()
936 static void bdev_yield_write_access(struct file *bdev_file) in bdev_yield_write_access() argument
943 if (bdev_unclaimed(bdev_file)) in bdev_yield_write_access()
946 bdev = file_bdev(bdev_file); in bdev_yield_write_access()
948 if (bdev_file->f_mode & FMODE_WRITE_RESTRICTED) in bdev_yield_write_access()
950 else if (bdev_file in bdev_yield_write_access()
972 bdev_open(struct block_device * bdev,blk_mode_t mode,void * holder,const struct blk_holder_ops * hops,struct file * bdev_file) bdev_open() argument
1082 struct file *bdev_file; bdev_file_open_by_dev() local
1139 bd_yield_claim(struct file * bdev_file) bd_yield_claim() argument
1153 bdev_release(struct file * bdev_file) bdev_release() argument
1206 bdev_yield_claim(struct file * bdev_file) bdev_yield_claim() argument
1238 bdev_fput(struct file * bdev_file) bdev_fput() argument
[all...]
H A Dblk.h770 void bdev_release(struct file *bdev_file); in blk_unfreeze_release_lock()
772 const struct blk_holder_ops *hops, struct file *bdev_file); in blk_unfreeze_release_lock()
/linux/drivers/block/xen-blkback/
H A Dxenbus.c84 if (!blkif->rings || !blkif->rings[0].irq || !blkif->vbd.bdev_file) in xen_update_blkif_status()
102 err = sync_blockdev(file_bdev(blkif->vbd.bdev_file)); in xen_update_blkif_status()
107 invalidate_inode_pages2(blkif->vbd.bdev_file->f_mapping); in xen_update_blkif_status()
493 if (vbd->bdev_file) in xen_vbd_create()
494 fput(vbd->bdev_file); in xen_vbd_create()
495 vbd->bdev_file = NULL; in xen_vbd_create()
503 struct file *bdev_file; in xen_vbd_create()
512 bdev_file = bdev_file_open_by_dev(vbd->pdevice, vbd->readonly ? in xen_vbd_create()
515 if (IS_ERR(bdev_file)) { in xen_vbd_create()
521 vbd->bdev_file in xen_vbd_create()
484 struct file *bdev_file; xen_vbd_create() local
[all...]
H A Dcommon.h224 struct file *bdev_file; member
365 #define vbd_sz(_v) bdev_nr_sectors(file_bdev((_v)->bdev_file))
H A Dblkback.c468 req->bdev = file_bdev(vbd->bdev_file); in xen_vbd_translate()
971 struct block_device *bdev = file_bdev(blkif->vbd.bdev_file); in dispatch_discard_io()
/linux/fs/
H A Dsuper.c1647 struct file *bdev_file; in super_dev_lookup()
1650 bdev_file = bdev_file_open_by_dev(dev, mode, holder, &fs_holder_ops); in super_dev_lookup()
1651 if (IS_ERR(bdev_file)) in super_dev_lookup()
1652 return bdev_file; in super_dev_lookup()
1654 err = fs_bdev_register(file_bdev(bdev_file), sb); in super_dev_lookup()
1656 bdev_fput(bdev_file);
1659 return bdev_file; in fs_bdev_register()
1681 struct file *bdev_file; in fs_bdev_register()
1684 bdev_file = bdev_file_open_by_path(path, mode, holder, &fs_holder_ops); in fs_bdev_register()
1685 if (IS_ERR(bdev_file)) in fs_bdev_register()
1657 fs_bdev_register(struct file * bdev_file,struct super_block * sb) fs_bdev_register() argument
1707 struct file *bdev_file; fs_bdev_file_open_by_dev() local
1741 struct file *bdev_file; fs_bdev_file_open_by_path() local
1769 fs_bdev_unregister(struct file * bdev_file,struct super_block * sb) fs_bdev_unregister() argument
1788 fs_bdev_file_release(struct file * bdev_file,struct super_block * sb) fs_bdev_file_release() argument
1799 struct file *bdev_file; setup_bdev_super() local
[all...]
/linux/fs/btrfs/
H A Dvolumes.c478 int flush, struct file **bdev_file, in btrfs_get_bdev_and_sb() argument
485 *bdev_file = fs_bdev_file_open_by_path(device_path, flags, in btrfs_get_bdev_and_sb()
488 *bdev_file = bdev_file_open_by_path(device_path, flags, NULL, in btrfs_get_bdev_and_sb()
491 if (IS_ERR(*bdev_file)) { in btrfs_get_bdev_and_sb()
492 ret = PTR_ERR(*bdev_file); in btrfs_get_bdev_and_sb()
497 bdev = file_bdev(*bdev_file); in btrfs_get_bdev_and_sb()
502 ret = set_blocksize(*bdev_file, BTRFS_BDEV_BLOCKSIZE); in btrfs_get_bdev_and_sb()
504 fs_bdev_file_release(*bdev_file, holder); in btrfs_get_bdev_and_sb()
513 fs_bdev_file_release(*bdev_file, holder); in btrfs_get_bdev_and_sb()
515 bdev_fput(*bdev_file); in btrfs_get_bdev_and_sb()
666 struct file *bdev_file; btrfs_open_one_device() local
1133 btrfs_release_device_allow_freeze(struct file * bdev_file) btrfs_release_device_allow_freeze() argument
1489 struct file *bdev_file; btrfs_scan_one_device() local
2357 btrfs_rm_device(struct btrfs_fs_info * fs_info,struct btrfs_dev_lookup_args * args,struct file ** bdev_file) btrfs_rm_device() argument
2649 struct file *bdev_file; btrfs_get_dev_args_from_path() local
2899 struct file *probe_file, *bdev_file; btrfs_open_device_deny_freeze() local
2926 struct file *bdev_file; btrfs_init_new_device() local
[all...]
H A Ddev-replace.c240 struct file *bdev_file; in btrfs_init_dev_replace_tgtdev()
252 bdev_file = btrfs_open_device_deny_freeze(device_path, fs_info->sb); in btrfs_init_dev_replace_tgtdev()
253 if (IS_ERR(bdev_file)) { in btrfs_init_dev_replace_tgtdev()
255 return PTR_ERR(bdev_file); in btrfs_init_dev_replace_tgtdev()
257 bdev = file_bdev(bdev_file); in btrfs_init_dev_replace_tgtdev()
309 device->bdev_file = bdev_file; in btrfs_init_dev_replace_tgtdev()
315 set_blocksize(bdev_file, BTRFS_BDEV_BLOCKSIZE); in btrfs_init_dev_replace_tgtdev()
335 btrfs_release_device_allow_freeze(bdev_file);
239 struct file *bdev_file; btrfs_init_dev_replace_tgtdev() local
H A Dvolumes.h131 struct file *bdev_file;
749 void btrfs_release_device_allow_freeze(struct file *bdev_file);
765 struct file **bdev_file);
134 struct file *bdev_file; global() member
H A Dioctl.c2614 struct file *bdev_file = NULL; in btrfs_ioctl_rm_dev_v2()
2654 ret = btrfs_rm_device(fs_info, &args, &bdev_file); in btrfs_ioctl_rm_dev()
2668 if (bdev_file) in btrfs_ioctl_rm_dev()
2669 btrfs_release_device_allow_freeze(bdev_file); in btrfs_ioctl_rm_dev()
2681 struct file *bdev_file = NULL; in btrfs_ioctl_rm_dev()
2711 ret = btrfs_rm_device(fs_info, &args, &bdev_file); in btrfs_ioctl_fs_info()
2718 if (bdev_file) in btrfs_ioctl_fs_info()
2719 btrfs_release_device_allow_freeze(bdev_file); in btrfs_ioctl_fs_info()
2590 struct file *bdev_file = NULL; btrfs_ioctl_rm_dev_v2() local
2657 struct file *bdev_file = NULL; btrfs_ioctl_rm_dev() local
/linux/drivers/target/
H A Dtarget_core_pscsi.c356 struct file *bdev_file; in pscsi_create_type_disk() local
370 bdev_file = bdev_file_open_by_path(dev->udev_path, in pscsi_create_type_disk()
372 if (IS_ERR(bdev_file)) { in pscsi_create_type_disk()
375 return PTR_ERR(bdev_file); in pscsi_create_type_disk()
377 pdv->pdv_bdev_file = bdev_file; in pscsi_create_type_disk()
381 fput(bdev_file); in pscsi_create_type_disk()
H A Dtarget_core_iblock.c94 struct file *bdev_file; in iblock_configure_device() local
124 bdev_file = bdev_file_open_by_path(ib_dev->ibd_udev_path, mode, holder, in iblock_configure_device()
126 if (IS_ERR(bdev_file)) { in iblock_configure_device()
127 ret = PTR_ERR(bdev_file); in iblock_configure_device()
130 ib_dev->ibd_bdev_file = bdev_file; in iblock_configure_device()
131 ib_dev->ibd_bd = bd = file_bdev(bdev_file); in iblock_configure_device()
/linux/drivers/block/rnbd/
H A Drnbd-srv.h49 struct file *bdev_file; member
/linux/drivers/md/
H A Ddm.c728 struct file *bdev_file; in open_table_device() local
741 * pinned in bdev_file->f_cred until the table device is closed. in open_table_device()
747 bdev_file = bdev_file_open_by_dev(dev, mode, _dm_claim_ptr, NULL); in open_table_device()
748 if (IS_ERR(bdev_file)) { in open_table_device()
749 r = PTR_ERR(bdev_file); in open_table_device()
753 bdev = file_bdev(bdev_file); in open_table_device()
768 td->dm_dev.bdev_file = bdev_file; in open_table_device()
776 __fput_sync(bdev_file); in open_table_device()
792 fput(td->dm_dev.bdev_file); in close_table_device()
[all...]
H A Dmd.h148 struct file *bdev_file; /* Handle from open for bdev */ member
/linux/fs/ext4/
H A Dsuper.c6108 struct file *bdev_file; in ext4_open_dev_journal()
6115 bdev_file = fs_bdev_file_open_by_dev(j_dev, in ext4_open_dev_journal()
6118 if (IS_ERR(bdev_file)) { in ext4_open_dev_journal()
6121 MAJOR(j_dev), MINOR(j_dev), bdev_file); in ext4_open_dev_journal()
6122 return bdev_file; in ext4_open_dev_journal()
6125 bdev = file_bdev(bdev_file);
6137 set_blocksize(bdev_file, blocksize); in ext4_load_journal()
6172 return bdev_file; in ext4_load_journal()
6177 fs_bdev_file_release(bdev_file, sb); in ext4_load_journal()
6187 struct file *bdev_file; in ext4_load_journal()
6014 struct file *bdev_file; ext4_get_journal_blkdev() local
6093 struct file *bdev_file; ext4_open_dev_journal() local
7535 struct file *bdev_file = sbi ? sbi->s_journal_bdev_file : NULL; ext4_kill_sb() local
[all...]
/linux/drivers/md/bcache/
H A Dbcache.h306 struct file *bdev_file; member
429 struct file *bdev_file; member
/linux/fs/xfs/
H A Dxfs_buf.h357 struct file *bdev_file);
H A Dxfs_buf.c1778 struct file *bdev_file) in xfs_alloc_buftarg() argument
1791 btp->bt_file = bdev_file; in xfs_alloc_buftarg()
1792 btp->bt_bdev = file_bdev(bdev_file); in xfs_alloc_buftarg()
/linux/include/linux/
H A Dblkdev.h1707 struct block_device *file_bdev(struct file *bdev_file);
1752 void bdev_fput(struct file *bdev_file);
1753 void bdev_yield_claim(struct file *bdev_file);
/linux/drivers/s390/block/
H A Ddasd.c451 disk_uevent(file_bdev(device->block->bdev_file)->bd_disk, in dasd_state_ready_to_online()
472 disk_uevent(file_bdev(device->block->bdev_file)->bd_disk, in dasd_state_online_to_ready()
3690 max_count = device->block->bdev_file ? 0 : -1; in dasd_generic_set_offline()
3735 if (device->block && device->block->bdev_file) in dasd_generic_set_offline()
3736 bdev_mark_dead(file_bdev(device->block->bdev_file), false); in dasd_generic_set_offline()
H A Ddasd_ioctl.c536 if (!block->bdev_file) in __dasd_ioctl_information()

12