/linux/drivers/s390/block/ |
H A D | dasd_genhd.c | 133 struct file *bdev_file; in dasd_scan_partitions() local 136 bdev_file = bdev_file_open_by_dev(disk_devt(block->gdp), BLK_OPEN_READ, in dasd_scan_partitions() 138 if (IS_ERR(bdev_file)) { in dasd_scan_partitions() 141 PTR_ERR(bdev_file)); in dasd_scan_partitions() 156 * increased from 0 to 1. This is done by setting device->bdev_file in dasd_scan_partitions() 159 * to block->bdev_file is done AFTER the BLKRRPART ioctl. in dasd_scan_partitions() 161 block->bdev_file = bdev_file; in dasd_scan_partitions() 171 struct file *bdev_file; in dasd_destroy_partitions() local 174 * Get the bdev_file pointe in dasd_destroy_partitions() [all...] |
H A D | dasd_ioctl.c | 535 if (!block->bdev_file) in __dasd_ioctl_information()
|
/linux/fs/nfs/blocklayout/ |
H A D | dev.c | 19 struct block_device *bdev = file_bdev(dev->bdev_file); in bl_unregister_scsi() 32 struct block_device *bdev = file_bdev(dev->bdev_file); in bl_register_scsi() 95 if (dev->bdev_file) in bl_free_device() 96 fput(dev->bdev_file); in bl_free_device() 230 map->bdev = file_bdev(dev->bdev_file); in bl_map_simple() 298 struct file *bdev_file; in bl_parse_simple() local 305 bdev_file = bdev_file_open_by_dev(dev, BLK_OPEN_READ | BLK_OPEN_WRITE, in bl_parse_simple() 307 if (IS_ERR(bdev_file)) { in bl_parse_simple() 309 MAJOR(dev), MINOR(dev), PTR_ERR(bdev_file)); in bl_parse_simple() 310 return PTR_ERR(bdev_file); in bl_parse_simple() 365 struct file *bdev_file; bl_open_path() local 391 struct file *bdev_file; bl_parse_scsi() local [all...] |
/linux/drivers/mtd/devices/ |
H A D | block2mtd.c | 40 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() 265 struct file *bdev_file; add_device() local [all...] |
/linux/block/ |
H A D | bdev.c | 58 struct block_device *file_bdev(struct file *bdev_file) in file_bdev() argument 60 return I_BDEV(bdev_file->f_mapping->host); in file_bdev() 886 static inline bool bdev_unclaimed(const struct file *bdev_file) in bdev_unclaimed() argument 888 return bdev_file->private_data == BDEV_I(bdev_file->f_mapping->host); in bdev_unclaimed() 891 static void bdev_yield_write_access(struct file *bdev_file) in bdev_yield_write_access() argument 898 if (bdev_unclaimed(bdev_file)) in bdev_yield_write_access() 901 bdev = file_bdev(bdev_file); in bdev_yield_write_access() 903 if (bdev_file->f_mode & FMODE_WRITE_RESTRICTED) in bdev_yield_write_access() 905 else if (bdev_file in bdev_yield_write_access() 927 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 1037 struct file *bdev_file; bdev_file_open_by_dev() local 1094 bd_yield_claim(struct file * bdev_file) bd_yield_claim() argument 1108 bdev_release(struct file * bdev_file) bdev_release() argument 1160 bdev_fput(struct file * bdev_file) bdev_fput() argument [all...] |
H A D | blk.h | 724 void bdev_release(struct file *bdev_file); 726 const struct blk_holder_ops *hops, struct file *bdev_file);
|
/linux/drivers/block/rnbd/ |
H A D | rnbd-srv.c | 148 bio = bio_alloc(file_bdev(sess_dev->bdev_file), 1, in process_rdma() 224 fput(sess_dev->bdev_file); in rnbd_destroy_sess_dev() 539 struct block_device *bdev = file_bdev(sess_dev->bdev_file); in rnbd_srv_fill_msg_open_rsp() 565 struct file *bdev_file, bool readonly, in rnbd_srv_create_set_sess_dev() argument 577 sdev->bdev_file = bdev_file; in rnbd_srv_create_set_sess_dev() 683 struct file *bdev_file; in process_msg_open() local 721 bdev_file = bdev_file_open_by_path(full_path, open_flags, NULL, NULL); in process_msg_open() 722 if (IS_ERR(bdev_file)) { in process_msg_open() 723 ret = PTR_ERR(bdev_file); in process_msg_open() [all...] |
H A D | rnbd-srv.h | 49 struct file *bdev_file; member
|
/linux/drivers/block/xen-blkback/ |
H A D | xenbus.c | 84 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() 475 if (vbd->bdev_file) in xen_vbd_free() 476 fput(vbd->bdev_file); in xen_vbd_free() 477 vbd->bdev_file = NULL; in xen_vbd_free() 485 struct file *bdev_file; in xen_vbd_create() local 494 bdev_file = bdev_file_open_by_dev(vbd->pdevice, vbd->readonly ? in xen_vbd_create() 497 if (IS_ERR(bdev_file)) { in xen_vbd_create() 503 vbd->bdev_file in xen_vbd_create() [all...] |
H A D | common.h | 224 struct file *bdev_file; member 363 #define vbd_sz(_v) bdev_nr_sectors(file_bdev((_v)->bdev_file))
|
/linux/drivers/nvme/target/ |
H A D | io-cmd-bdev.c | 57 if (ns->bdev_file) { in nvmet_bdev_ns_disable() 58 fput(ns->bdev_file); in nvmet_bdev_ns_disable() 60 ns->bdev_file = NULL; in nvmet_bdev_ns_disable() 94 ns->bdev_file = bdev_file_open_by_path(ns->device_path, in nvmet_bdev_ns_enable() 96 if (IS_ERR(ns->bdev_file)) { in nvmet_bdev_ns_enable() 97 ret = PTR_ERR(ns->bdev_file); in nvmet_bdev_ns_enable() 102 ns->bdev_file = NULL; in nvmet_bdev_ns_enable() 105 ns->bdev = file_bdev(ns->bdev_file); in nvmet_bdev_ns_enable()
|
/linux/drivers/md/bcache/ |
H A D | super.c | 1371 if (dc->bdev_file) in CLOSURE_CALLBACK() 1372 fput(dc->bdev_file); in CLOSURE_CALLBACK() 1442 struct file *bdev_file, in register_bdev() argument 1450 dc->bdev_file = bdev_file; in register_bdev() 1451 dc->bdev = file_bdev(bdev_file); in register_bdev() 2221 if (ca->bdev_file) in bch_cache_release() 2222 fput(ca->bdev_file); in bch_cache_release() 2374 struct file *bdev_file, in register_cache() argument 2381 ca->bdev_file in register_cache() 2481 struct file *bdev_file; global() member 2551 struct file *bdev_file, *bdev_file2; register_bcache() local [all...] |
/linux/fs/jfs/ |
H A D | jfs_logmgr.c | 1061 struct file *bdev_file; in lmLogOpen() local 1073 if (file_bdev(log->bdev_file)->bd_dev == sbi->logdev) { in lmLogOpen() 1103 bdev_file = bdev_file_open_by_dev(sbi->logdev, in lmLogOpen() 1105 if (IS_ERR(bdev_file)) { in lmLogOpen() 1106 rc = PTR_ERR(bdev_file); in lmLogOpen() 1110 log->bdev_file = bdev_file; in lmLogOpen() 1144 bdev_fput(bdev_file); in lmLogOpen() 1165 log->bdev_file = sb->s_bdev_file; in open_inline_log() 1439 struct file *bdev_file; in lmLogClose() local [all...] |
H A D | jfs_logmgr.h | 359 struct file *bdev_file; /* 4: log lv pointer */ member
|
H A D | jfs_mount.c | 434 new_encode_dev(file_bdev(sbi->log->bdev_file)->bd_dev)); in updateSuper()
|
/linux/fs/btrfs/ |
H A D | dev-replace.c | 241 struct file *bdev_file; in btrfs_init_dev_replace_tgtdev() local 252 bdev_file = bdev_file_open_by_path(device_path, BLK_OPEN_WRITE, in btrfs_init_dev_replace_tgtdev() 254 if (IS_ERR(bdev_file)) { in btrfs_init_dev_replace_tgtdev() 256 return PTR_ERR(bdev_file); in btrfs_init_dev_replace_tgtdev() 258 bdev = file_bdev(bdev_file); in btrfs_init_dev_replace_tgtdev() 309 device->bdev_file = bdev_file; in btrfs_init_dev_replace_tgtdev() 313 set_blocksize(bdev_file, BTRFS_BDEV_BLOCKSIZE); in btrfs_init_dev_replace_tgtdev() 330 bdev_fput(bdev_file); in btrfs_init_dev_replace_tgtdev()
|
H A D | ioctl.c | 2650 struct file *bdev_file = NULL; in btrfs_ioctl_rm_dev_v2() local 2690 ret = btrfs_rm_device(fs_info, &args, &bdev_file); in btrfs_ioctl_rm_dev_v2() 2704 if (bdev_file) in btrfs_ioctl_rm_dev_v2() 2705 bdev_fput(bdev_file); in btrfs_ioctl_rm_dev_v2() 2718 struct file *bdev_file = NULL; in btrfs_ioctl_rm_dev() local 2748 ret = btrfs_rm_device(fs_info, &args, &bdev_file); in btrfs_ioctl_rm_dev() 2755 if (bdev_file) in btrfs_ioctl_rm_dev() 2756 bdev_fput(bdev_file); in btrfs_ioctl_rm_dev()
|
/linux/drivers/target/ |
H A D | target_core_iblock.c | 95 struct file *bdev_file; in iblock_configure_device() local 125 bdev_file = bdev_file_open_by_path(ib_dev->ibd_udev_path, mode, holder, in iblock_configure_device() 127 if (IS_ERR(bdev_file)) { in iblock_configure_device() 128 ret = PTR_ERR(bdev_file); in iblock_configure_device() 131 ib_dev->ibd_bdev_file = bdev_file; in iblock_configure_device() 132 ib_dev->ibd_bd = bd = file_bdev(bdev_file); in iblock_configure_device()
|
/linux/drivers/md/ |
H A D | dm.c | 732 struct file *bdev_file; in open_table_device() local 742 bdev_file = bdev_file_open_by_dev(dev, mode, _dm_claim_ptr, NULL); in open_table_device() 743 if (IS_ERR(bdev_file)) { in open_table_device() 744 r = PTR_ERR(bdev_file); in open_table_device() 748 bdev = file_bdev(bdev_file); in open_table_device() 763 td->dm_dev.bdev_file = bdev_file; in open_table_device() 771 __fput_sync(bdev_file); in open_table_device() 787 fput(td->dm_dev.bdev_file); in close_table_device() 789 __fput_sync(td->dm_dev.bdev_file); in close_table_device() [all...] |
H A D | md.h | 144 struct file *bdev_file; /* Handle from open for bdev */ member
|
/linux/fs/ext4/ |
H A D | super.c | 5868 struct file *bdev_file; in ext4_get_journal_blkdev() local 5875 bdev_file = bdev_file_open_by_dev(j_dev, in ext4_get_journal_blkdev() 5878 if (IS_ERR(bdev_file)) { in ext4_get_journal_blkdev() 5881 MAJOR(j_dev), MINOR(j_dev), PTR_ERR(bdev_file)); in ext4_get_journal_blkdev() 5882 return bdev_file; in ext4_get_journal_blkdev() 5885 bdev = file_bdev(bdev_file); in ext4_get_journal_blkdev() 5897 set_blocksize(bdev_file, blocksize); in ext4_get_journal_blkdev() 5932 return bdev_file; in ext4_get_journal_blkdev() 5937 bdev_fput(bdev_file); in ext4_get_journal_blkdev() 5947 struct file *bdev_file; in ext4_open_dev_journal() local 7389 struct file *bdev_file = sbi ? sbi->s_journal_bdev_file : NULL; ext4_kill_sb() local [all...] |
/linux/fs/xfs/ |
H A D | xfs_buf.h | 371 struct file *bdev_file);
|
H A D | xfs_buf.c | 1788 struct file *bdev_file) in xfs_alloc_buftarg() argument 1801 btp->bt_file = bdev_file; in xfs_alloc_buftarg() 1802 btp->bt_bdev = file_bdev(bdev_file); in xfs_alloc_buftarg()
|
/linux/include/linux/ |
H A D | device-mapper.h | 175 struct file *bdev_file; member
|
H A D | blkdev.h | 1781 struct block_device *file_bdev(struct file *bdev_file); 1824 void bdev_fput(struct file *bdev_file);
|