/linux-6.12.1/drivers/s390/block/ |
D | dasd_genhd.c | 134 struct file *bdev_file; in dasd_scan_partitions() local 137 bdev_file = bdev_file_open_by_dev(disk_devt(block->gdp), BLK_OPEN_READ, in dasd_scan_partitions() 139 if (IS_ERR(bdev_file)) { in dasd_scan_partitions() 142 PTR_ERR(bdev_file)); in dasd_scan_partitions() 162 block->bdev_file = bdev_file; in dasd_scan_partitions() 172 struct file *bdev_file; in dasd_destroy_partitions() local 178 bdev_file = block->bdev_file; in dasd_destroy_partitions() 179 block->bdev_file = NULL; in dasd_destroy_partitions() 181 mutex_lock(&file_bdev(bdev_file)->bd_disk->open_mutex); in dasd_destroy_partitions() 182 bdev_disk_changed(file_bdev(bdev_file)->bd_disk, true); in dasd_destroy_partitions() [all …]
|
/linux-6.12.1/fs/nfs/blocklayout/ |
D | dev.c | 19 struct block_device *bdev = file_bdev(dev->bdev_file); in bl_unregister_scsi() 35 struct block_device *bdev = file_bdev(dev->bdev_file); in bl_register_scsi() 97 if (dev->bdev_file) in bl_free_device() 98 fput(dev->bdev_file); in bl_free_device() 232 map->bdev = file_bdev(dev->bdev_file); in bl_map_simple() 299 struct file *bdev_file; in bl_parse_simple() local 306 bdev_file = bdev_file_open_by_dev(dev, BLK_OPEN_READ | BLK_OPEN_WRITE, in bl_parse_simple() 308 if (IS_ERR(bdev_file)) { in bl_parse_simple() 310 MAJOR(dev), MINOR(dev), PTR_ERR(bdev_file)); in bl_parse_simple() 311 return PTR_ERR(bdev_file); in bl_parse_simple() [all …]
|
D | blocklayout.h | 112 struct file *bdev_file; member
|
/linux-6.12.1/block/ |
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() 845 static inline bool bdev_unclaimed(const struct file *bdev_file) in bdev_unclaimed() argument 847 return bdev_file->private_data == BDEV_I(bdev_file->f_mapping->host); in bdev_unclaimed() 850 static void bdev_yield_write_access(struct file *bdev_file) in bdev_yield_write_access() argument 857 if (bdev_unclaimed(bdev_file)) in bdev_yield_write_access() 860 bdev = file_bdev(bdev_file); in bdev_yield_write_access() 862 if (bdev_file->f_mode & FMODE_WRITE_RESTRICTED) in bdev_yield_write_access() 864 else if (bdev_file->f_mode & FMODE_WRITE) in bdev_yield_write_access() 886 const struct blk_holder_ops *hops, struct file *bdev_file) in bdev_open() argument [all …]
|
D | blk.h | 727 void bdev_release(struct file *bdev_file); 729 const struct blk_holder_ops *hops, struct file *bdev_file);
|
/linux-6.12.1/drivers/mtd/devices/ |
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() [all …]
|
/linux-6.12.1/drivers/block/rnbd/ |
D | rnbd-srv.c | 148 bio = bio_alloc(file_bdev(sess_dev->bdev_file), 1, in process_rdma() 229 fput(sess_dev->bdev_file); in rnbd_destroy_sess_dev() 544 struct block_device *bdev = file_bdev(sess_dev->bdev_file); in rnbd_srv_fill_msg_open_rsp() 570 struct file *bdev_file, bool readonly, in rnbd_srv_create_set_sess_dev() argument 582 sdev->bdev_file = bdev_file; in rnbd_srv_create_set_sess_dev() 688 struct file *bdev_file; in process_msg_open() local 726 bdev_file = bdev_file_open_by_path(full_path, open_flags, NULL, NULL); in process_msg_open() 727 if (IS_ERR(bdev_file)) { in process_msg_open() 728 ret = PTR_ERR(bdev_file); in process_msg_open() 730 full_path, srv_sess->sessname, bdev_file); in process_msg_open() [all …]
|
D | rnbd-srv.h | 49 struct file *bdev_file; member
|
/linux-6.12.1/drivers/block/xen-blkback/ |
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 = bdev_file; in xen_vbd_create() [all …]
|
D | common.h | 224 struct file *bdev_file; member 363 #define vbd_sz(_v) bdev_nr_sectors(file_bdev((_v)->bdev_file))
|
/linux-6.12.1/drivers/nvme/target/ |
D | io-cmd-bdev.c | 53 if (ns->bdev_file) { in nvmet_bdev_ns_disable() 54 fput(ns->bdev_file); in nvmet_bdev_ns_disable() 56 ns->bdev_file = NULL; in nvmet_bdev_ns_disable() 90 ns->bdev_file = bdev_file_open_by_path(ns->device_path, in nvmet_bdev_ns_enable() 92 if (IS_ERR(ns->bdev_file)) { in nvmet_bdev_ns_enable() 93 ret = PTR_ERR(ns->bdev_file); in nvmet_bdev_ns_enable() 98 ns->bdev_file = NULL; in nvmet_bdev_ns_enable() 101 ns->bdev = file_bdev(ns->bdev_file); in nvmet_bdev_ns_enable()
|
/linux-6.12.1/drivers/md/bcache/ |
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() 2215 if (ca->bdev_file) in bch_cache_release() 2216 fput(ca->bdev_file); in bch_cache_release() 2336 struct file *bdev_file, in register_cache() argument 2343 ca->bdev_file = bdev_file; in register_cache() 2344 ca->bdev = file_bdev(bdev_file); in register_cache() [all …]
|
D | bcache.h | 304 struct file *bdev_file; member 427 struct file *bdev_file; member
|
/linux-6.12.1/drivers/block/ |
D | pktcdvd.c | 343 MAJOR(file_bdev(pd->bdev_file)->bd_dev), in device_map_show() 344 MINOR(file_bdev(pd->bdev_file)->bd_dev)); in device_map_show() 441 file_bdev(pd->bdev_file)); in pkt_seq_show() 716 struct request_queue *q = bdev_get_queue(file_bdev(pd->bdev_file)); in pkt_generic_packet() 1055 bio_init(bio, file_bdev(pd->bdev_file), bio->bi_inline_vecs, 1, in pkt_gather_data() 1271 bio_init(pkt->w_bio, file_bdev(pd->bdev_file), pkt->w_bio->bi_inline_vecs, in pkt_start_write() 2169 struct file *bdev_file; in pkt_open_dev() local 2176 bdev_file = bdev_file_open_by_dev(file_bdev(pd->bdev_file)->bd_dev, in pkt_open_dev() 2178 if (IS_ERR(bdev_file)) { in pkt_open_dev() 2179 ret = PTR_ERR(bdev_file); in pkt_open_dev() [all …]
|
/linux-6.12.1/fs/jfs/ |
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 1485 bdev_file = log->bdev_file; in lmLogClose() [all …]
|
D | jfs_logmgr.h | 359 struct file *bdev_file; /* 4: log lv pointer */ member
|
/linux-6.12.1/fs/btrfs/ |
D | volumes.c | 469 int flush, struct file **bdev_file, in btrfs_get_bdev_and_sb() argument 475 *bdev_file = bdev_file_open_by_path(device_path, flags, holder, NULL); in btrfs_get_bdev_and_sb() 477 if (IS_ERR(*bdev_file)) { in btrfs_get_bdev_and_sb() 478 ret = PTR_ERR(*bdev_file); in btrfs_get_bdev_and_sb() 483 bdev = file_bdev(*bdev_file); in btrfs_get_bdev_and_sb() 488 ret = set_blocksize(*bdev_file, BTRFS_BDEV_BLOCKSIZE); in btrfs_get_bdev_and_sb() 490 fput(*bdev_file); in btrfs_get_bdev_and_sb() 498 fput(*bdev_file); in btrfs_get_bdev_and_sb() 506 *bdev_file = NULL; in btrfs_get_bdev_and_sb() 649 struct file *bdev_file; in btrfs_open_one_device() local [all …]
|
D | dev-replace.c | 247 struct file *bdev_file; in btrfs_init_dev_replace_tgtdev() local 258 bdev_file = bdev_file_open_by_path(device_path, BLK_OPEN_WRITE, in btrfs_init_dev_replace_tgtdev() 260 if (IS_ERR(bdev_file)) { in btrfs_init_dev_replace_tgtdev() 262 return PTR_ERR(bdev_file); in btrfs_init_dev_replace_tgtdev() 264 bdev = file_bdev(bdev_file); in btrfs_init_dev_replace_tgtdev() 315 device->bdev_file = bdev_file; in btrfs_init_dev_replace_tgtdev() 319 set_blocksize(bdev_file, BTRFS_BDEV_BLOCKSIZE); in btrfs_init_dev_replace_tgtdev() 336 fput(bdev_file); in btrfs_init_dev_replace_tgtdev()
|
D | volumes.h | 117 struct file *bdev_file; member 716 struct file **bdev_file);
|
/linux-6.12.1/drivers/target/ |
D | target_core_pscsi.c | 355 struct file *bdev_file; in pscsi_create_type_disk() local 369 bdev_file = bdev_file_open_by_path(dev->udev_path, in pscsi_create_type_disk() 371 if (IS_ERR(bdev_file)) { in pscsi_create_type_disk() 374 return PTR_ERR(bdev_file); in pscsi_create_type_disk() 376 pdv->pdv_bdev_file = bdev_file; in pscsi_create_type_disk() 380 fput(bdev_file); in pscsi_create_type_disk()
|
D | target_core_iblock.c | 94 struct file *bdev_file; in iblock_configure_device() local 120 bdev_file = bdev_file_open_by_path(ib_dev->ibd_udev_path, mode, ib_dev, in iblock_configure_device() 122 if (IS_ERR(bdev_file)) { in iblock_configure_device() 123 ret = PTR_ERR(bdev_file); in iblock_configure_device() 126 ib_dev->ibd_bdev_file = bdev_file; in iblock_configure_device() 127 ib_dev->ibd_bd = bd = file_bdev(bdev_file); in iblock_configure_device()
|
/linux-6.12.1/fs/ |
D | super.c | 1551 struct file *bdev_file; in setup_bdev_super() local 1554 bdev_file = bdev_file_open_by_dev(sb->s_dev, mode, sb, &fs_holder_ops); in setup_bdev_super() 1555 if (IS_ERR(bdev_file)) { in setup_bdev_super() 1558 return PTR_ERR(bdev_file); in setup_bdev_super() 1560 bdev = file_bdev(bdev_file); in setup_bdev_super() 1568 bdev_fput(bdev_file); in setup_bdev_super() 1579 bdev_fput(bdev_file); in setup_bdev_super() 1583 sb->s_bdev_file = bdev_file; in setup_bdev_super()
|
/linux-6.12.1/include/linux/ |
D | pktcdvd.h | 157 struct file *bdev_file; /* dev attached */ member
|
/linux-6.12.1/drivers/md/ |
D | dm.c | 730 struct file *bdev_file; in open_table_device() local 740 bdev_file = bdev_file_open_by_dev(dev, mode, _dm_claim_ptr, NULL); in open_table_device() 741 if (IS_ERR(bdev_file)) { in open_table_device() 742 r = PTR_ERR(bdev_file); in open_table_device() 746 bdev = file_bdev(bdev_file); in open_table_device() 761 td->dm_dev.bdev_file = bdev_file; in open_table_device() 769 __fput_sync(bdev_file); in open_table_device() 785 fput(td->dm_dev.bdev_file); in close_table_device() 787 __fput_sync(td->dm_dev.bdev_file); in close_table_device()
|
/linux-6.12.1/fs/ext4/ |
D | super.c | 5834 struct file *bdev_file; in ext4_get_journal_blkdev() local 5841 bdev_file = bdev_file_open_by_dev(j_dev, in ext4_get_journal_blkdev() 5844 if (IS_ERR(bdev_file)) { in ext4_get_journal_blkdev() 5847 MAJOR(j_dev), MINOR(j_dev), PTR_ERR(bdev_file)); in ext4_get_journal_blkdev() 5848 return bdev_file; in ext4_get_journal_blkdev() 5851 bdev = file_bdev(bdev_file); in ext4_get_journal_blkdev() 5863 set_blocksize(bdev_file, blocksize); in ext4_get_journal_blkdev() 5898 return bdev_file; in ext4_get_journal_blkdev() 5903 bdev_fput(bdev_file); in ext4_get_journal_blkdev() 5913 struct file *bdev_file; in ext4_open_dev_journal() local [all …]
|