Home
last modified time | relevance | path

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

123

/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.c183 struct block_device *bdev; member
402 ds->bdev = NULL; in btrfsic_dev_state_init()
442 ((unsigned int)((uintptr_t)b->dev_state->bdev))) & in btrfsic_block_hashtable_add()
454 struct block_device *bdev, in btrfsic_block_hashtable_lookup() argument
460 ((unsigned int)((uintptr_t)bdev))) & in btrfsic_block_hashtable_lookup()
465 if (b->dev_state->bdev == bdev && b->dev_bytenr == dev_bytenr) in btrfsic_block_hashtable_lookup()
488 ((unsigned int)((uintptr_t)l->block_ref_to->dev_state->bdev)) ^ in btrfsic_block_link_hashtable_add()
489 ((unsigned int)((uintptr_t)l->block_ref_from->dev_state->bdev))) in btrfsic_block_link_hashtable_add()
520 if (l->block_ref_to->dev_state->bdev == bdev_ref_to && in btrfsic_block_link_hashtable_lookup()
522 l->block_ref_from->dev_state->bdev == bdev_ref_from && in btrfsic_block_link_hashtable_lookup()
[all …]
Dzoned.c79 static int sb_write_pointer(struct block_device *bdev, struct blk_zone *zones, in sb_write_pointer() argument
116 struct address_space *mapping = bdev->bd_inode->i_mapping; in sb_write_pointer()
175 struct block_device *bdev) in zone_start_sector() argument
177 return (sector_t)zone_number << ilog2(bdev_zone_sectors(bdev)); in zone_start_sector()
195 sector_t bdev_size = bdev_nr_sectors(device->bdev); in emulate_report_zones()
226 if (!bdev_is_zoned(device->bdev)) { in btrfs_get_dev_zones()
260 ret = blkdev_report_zones(device->bdev, pos >> SECTOR_SHIFT, *nr_zones, in btrfs_get_dev_zones()
338 if (!device->bdev) in btrfs_get_dev_zone_info_all_devices()
354 struct block_device *bdev = device->bdev; in btrfs_get_dev_zone_info() local
381 if (!bdev_is_zoned(bdev)) { in btrfs_get_dev_zone_info()
[all …]
Dzoned.h42 int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw,
47 int btrfs_reset_sb_log_zones(struct block_device *bdev, int mirror);
131 static inline int btrfs_sb_log_location_bdev(struct block_device *bdev, in btrfs_sb_log_location_bdev() argument
150 static inline int btrfs_reset_sb_log_zones(struct block_device *bdev, int mirror) in btrfs_reset_sb_log_zones() argument
329 struct block_device *bdev) in btrfs_check_device_zone_type() argument
336 if (!bdev_is_zoned(bdev)) in btrfs_check_device_zone_type()
340 (bdev_zone_sectors(bdev) << SECTOR_SHIFT); in btrfs_check_device_zone_type()
344 return bdev_zoned_model(bdev) != BLK_ZONED_HM; in btrfs_check_device_zone_type()
Dvolumes.c499 int flush, struct block_device **bdev, in btrfs_get_bdev_and_sb() argument
504 *bdev = blkdev_get_by_path(device_path, flags, holder); in btrfs_get_bdev_and_sb()
506 if (IS_ERR(*bdev)) { in btrfs_get_bdev_and_sb()
507 ret = PTR_ERR(*bdev); in btrfs_get_bdev_and_sb()
512 sync_blockdev(*bdev); in btrfs_get_bdev_and_sb()
513 ret = set_blocksize(*bdev, BTRFS_BDEV_BLOCKSIZE); in btrfs_get_bdev_and_sb()
515 blkdev_put(*bdev, flags); in btrfs_get_bdev_and_sb()
518 invalidate_bdev(*bdev); in btrfs_get_bdev_and_sb()
519 *disk_super = btrfs_read_dev_super(*bdev); in btrfs_get_bdev_and_sb()
522 blkdev_put(*bdev, flags); in btrfs_get_bdev_and_sb()
[all …]
Ddev-replace.c248 struct block_device *bdev; in btrfs_init_dev_replace_tgtdev() local
259 bdev = blkdev_get_by_path(device_path, FMODE_WRITE | FMODE_EXCL, in btrfs_init_dev_replace_tgtdev()
261 if (IS_ERR(bdev)) { in btrfs_init_dev_replace_tgtdev()
263 return PTR_ERR(bdev); in btrfs_init_dev_replace_tgtdev()
266 if (!btrfs_check_device_zone_type(fs_info, bdev)) { in btrfs_init_dev_replace_tgtdev()
273 sync_blockdev(bdev); in btrfs_init_dev_replace_tgtdev()
276 if (device->bdev == bdev) { in btrfs_init_dev_replace_tgtdev()
285 if (bdev_nr_bytes(bdev) < btrfs_device_get_total_bytes(srcdev)) { in btrfs_init_dev_replace_tgtdev()
321 device->bdev = bdev; in btrfs_init_dev_replace_tgtdev()
326 set_blocksize(device->bdev, BTRFS_BDEV_BLOCKSIZE); in btrfs_init_dev_replace_tgtdev()
[all …]
Ddisk-io.h55 struct btrfs_super_block *btrfs_read_dev_super(struct block_device *bdev);
56 struct btrfs_super_block *btrfs_read_dev_one_super(struct block_device *bdev,
/fs/
Dsuper.c804 struct super_block *get_super(struct block_device *bdev) in get_super() argument
808 if (!bdev) in get_super()
816 if (sb->s_bdev == bdev) { in get_super()
842 struct super_block *get_active_super(struct block_device *bdev) in get_active_super() argument
846 if (!bdev) in get_active_super()
854 if (sb->s_bdev == bdev) { in get_active_super()
1294 struct block_device *bdev; in get_tree_bdev() local
1305 bdev = blkdev_get_by_path(fc->source, mode, fc->fs_type); in get_tree_bdev()
1306 if (IS_ERR(bdev)) { in get_tree_bdev()
1308 return PTR_ERR(bdev); in get_tree_bdev()
[all …]
Dbuffer.c190 __find_get_block_slow(struct block_device *bdev, sector_t block) in __find_get_block_slow() argument
192 struct inode *bd_inode = bdev->bd_inode; in __find_get_block_slow()
235 bh->b_state, bh->b_size, bdev, in __find_get_block_slow()
602 void write_boundary_block(struct block_device *bdev, in write_boundary_block() argument
605 struct buffer_head *bh = __find_get_block(bdev, bblock + 1, blocksize); in write_boundary_block()
918 static sector_t blkdev_max_block(struct block_device *bdev, unsigned int size) in blkdev_max_block() argument
921 loff_t sz = bdev_nr_bytes(bdev); in blkdev_max_block()
934 init_page_buffers(struct page *page, struct block_device *bdev, in init_page_buffers() argument
940 sector_t end_block = blkdev_max_block(bdev, size); in init_page_buffers()
946 bh->b_bdev = bdev; in init_page_buffers()
[all …]
Dmpage.c148 struct block_device *bdev = NULL; in do_mpage_readpage() local
196 bdev = map_bh->b_bdev; in do_mpage_readpage()
251 bdev = map_bh->b_bdev; in do_mpage_readpage()
280 if (!bdev_read_page(bdev, blocks[0] << (blkbits - 9), in do_mpage_readpage()
284 args->bio = bio_alloc(bdev, bio_max_segs(args->nr_pages), opf, in do_mpage_readpage()
470 struct block_device *bdev = NULL; in __mpage_writepage() local
514 bdev = bh->b_bdev; in __mpage_writepage()
554 bdev = map_bh.b_bdev; in __mpage_writepage()
590 if (!bdev_write_page(bdev, blocks[0] << (blkbits - 9), in __mpage_writepage()
594 bio = bio_alloc(bdev, BIO_MAX_VECS, in __mpage_writepage()
/fs/iomap/
Dtrace.h121 __field(dev_t, bdev)
131 __entry->bdev = iomap->bdev ? iomap->bdev->bd_dev : 0;
137 MAJOR(__entry->bdev), MINOR(__entry->bdev),
Ddirect-io.c58 return bio_alloc_bioset(iter->iomap.bdev, nr_vecs, opf, in iomap_dio_alloc_bio()
60 return bio_alloc(iter->iomap.bdev, nr_vecs, opf, GFP_KERNEL); in iomap_dio_alloc_bio()
243 unsigned int blkbits = blksize_bits(bdev_logical_block_size(iomap->bdev)); in iomap_dio_bio_iter()
256 !bdev_iter_is_aligned(iomap->bdev, dio->submit.iter)) in iomap_dio_bio_iter()
278 (dio->flags & IOMAP_DIO_WRITE_FUA) && bdev_fua(iomap->bdev)) in iomap_dio_bio_iter()
Dswapfile.c119 if (iomap->bdev != isi->sis->bdev) in iomap_swapfile_iter()
/fs/f2fs/
Dsegment.c520 struct block_device *bdev) in __submit_flush_wait() argument
522 int ret = blkdev_issue_flush(bdev); in __submit_flush_wait()
524 trace_f2fs_issue_flush(bdev, test_opt(sbi, NOBARRIER), in __submit_flush_wait()
542 ret = __submit_flush_wait(sbi, FDEV(i).bdev); in submit_flush_wait()
723 ret = __submit_flush_wait(sbi, FDEV(i).bdev); in f2fs_flush_device_cache()
931 struct block_device *bdev, block_t lstart, in __create_discard_cmd() argument
944 dc->bdev = bdev; in __create_discard_cmd()
1088 trace_f2fs_remove_discard(dc->bdev, dc->di.start, dc->di.len); in __remove_discard_cmd()
1199 struct block_device *bdev, block_t lstart,
1206 struct block_device *bdev = dc->bdev; in __submit_discard_cmd() local
[all …]
/fs/nilfs2/
Dsuper.c1219 struct block_device *bdev; member
1309 sd.bdev = blkdev_get_by_path(dev_name, mode, fs_type); in nilfs_mount()
1310 if (IS_ERR(sd.bdev)) in nilfs_mount()
1311 return ERR_CAST(sd.bdev); in nilfs_mount()
1325 mutex_lock(&sd.bdev->bd_fsfreeze_mutex); in nilfs_mount()
1326 if (sd.bdev->bd_fsfreeze_count > 0) { in nilfs_mount()
1327 mutex_unlock(&sd.bdev->bd_fsfreeze_mutex); in nilfs_mount()
1332 sd.bdev); in nilfs_mount()
1333 mutex_unlock(&sd.bdev->bd_fsfreeze_mutex); in nilfs_mount()
1344 snprintf(s->s_id, sizeof(s->s_id), "%pg", sd.bdev); in nilfs_mount()
[all …]
/fs/erofs/
Ddata.c222 map->m_bdev = dif->bdev; in erofs_map_dev()
240 map->m_bdev = dif->bdev; in erofs_map_dev()
279 iomap->bdev = mdev.m_bdev; in erofs_iomap_begin()
383 struct block_device *bdev = inode->i_sb->s_bdev; in erofs_file_read_iter() local
386 if (bdev) in erofs_file_read_iter()
387 blksize_mask = bdev_logical_block_size(bdev) - 1; in erofs_file_read_iter()
Dsuper.c184 struct block_device *bdev; in erofs_init_device() local
208 bdev = blkdev_get_by_path(dif->path, FMODE_READ | FMODE_EXCL, in erofs_init_device()
210 if (IS_ERR(bdev)) in erofs_init_device()
211 return PTR_ERR(bdev); in erofs_init_device()
212 dif->bdev = bdev; in erofs_init_device()
213 dif->dax_dev = fs_dax_get_by_bdev(bdev, &dif->dax_part_off, in erofs_init_device()
761 if (dif->bdev) in erofs_release_device_info()
762 blkdev_put(dif->bdev, FMODE_READ | FMODE_EXCL); in erofs_release_device_info()
/fs/jfs/
Djfs_logmgr.c1061 struct block_device *bdev; in lmLogOpen() local
1073 if (log->bdev->bd_dev == sbi->logdev) { in lmLogOpen()
1103 bdev = blkdev_get_by_dev(sbi->logdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL, in lmLogOpen()
1105 if (IS_ERR(bdev)) { in lmLogOpen()
1106 rc = PTR_ERR(bdev); in lmLogOpen()
1110 log->bdev = bdev; in lmLogOpen()
1144 blkdev_put(bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL); in lmLogOpen()
1165 log->bdev = sb->s_bdev; in open_inline_log()
1439 struct block_device *bdev; in lmLogClose() local
1485 bdev = log->bdev; in lmLogClose()
[all …]
/fs/xfs/
Dxfs_bio_io.c14 struct block_device *bdev, in xfs_rw_bdev() argument
29 bio = bio_alloc(bdev, bio_max_vecs(left), op | REQ_META | REQ_SYNC, in xfs_rw_bdev()
Dxfs_discard.c31 struct block_device *bdev = mp->m_ddev_targp->bt_bdev; in xfs_trim_extents() local
117 error = blkdev_issue_discard(bdev, dbno, dlen, GFP_NOFS); in xfs_trim_extents()
/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/nfsd/
Dblocklayout.c332 struct block_device *bdev = ls->ls_file->nf_file->f_path.mnt->mnt_sb->s_bdev; in nfsd4_scsi_fence_client() local
334 bdev->bd_disk->fops->pr_ops->pr_preempt(bdev, NFSD_MDS_PR_KEY, in nfsd4_scsi_fence_client()
/fs/ntfs3/
Dsuper.c896 struct block_device *bdev = sb->s_bdev; in ntfs_fill_super() local
928 if (bdev_max_discard_sectors(bdev) && bdev_discard_granularity(bdev)) { in ntfs_fill_super()
929 sbi->discard_granularity = bdev_discard_granularity(bdev); in ntfs_fill_super()
935 err = ntfs_init_from_boot(sb, bdev_logical_block_size(bdev), in ntfs_fill_super()
936 bdev_nr_bytes(bdev)); in ntfs_fill_super()
1294 struct block_device *bdev = sb->s_bdev; in ntfs_unmap_meta() local
1309 clean_bdev_aliases(bdev, devblock++, 1); in ntfs_unmap_meta()
1311 sync_blockdev(bdev); in ntfs_unmap_meta()
/fs/zonefs/
Dfile.c41 iomap->bdev = inode->i_sb->s_bdev; in zonefs_read_iomap_begin()
91 iomap->bdev = inode->i_sb->s_bdev; in zonefs_write_iomap_begin()
388 struct block_device *bdev = inode->i_sb->s_bdev; in zonefs_file_dio_append() local
389 unsigned int max = bdev_max_zone_append_sectors(bdev); in zonefs_file_dio_append()
416 bio = bio_alloc(bdev, nr_pages, in zonefs_file_dio_append()

123