/fs/iomap/ |
D | swapfile.c | 15 struct iomap iomap; /* accumulated iomap */ member 31 struct iomap *iomap = &isi->iomap; in iomap_swapfile_add_extent() local 42 first_ppage = ALIGN(iomap->addr, PAGE_SIZE) >> PAGE_SHIFT; in iomap_swapfile_add_extent() 43 next_ppage = ALIGN_DOWN(iomap->addr + iomap->length, PAGE_SIZE) >> in iomap_swapfile_add_extent() 57 if (iomap->offset == 0) in iomap_swapfile_add_extent() 79 loff_t count, void *data, struct iomap *iomap) in iomap_swapfile_activate_actor() argument 84 switch (iomap->type) { in iomap_swapfile_activate_actor() 99 if (iomap->flags & IOMAP_F_DIRTY) { in iomap_swapfile_activate_actor() 103 if (iomap->flags & IOMAP_F_SHARED) { in iomap_swapfile_activate_actor() 109 if (iomap->bdev != isi->sis->bdev) { in iomap_swapfile_activate_actor() [all …]
|
D | buffered-io.c | 188 struct iomap *iomap) in iomap_read_inline_data() argument 197 BUG_ON(size > PAGE_SIZE - offset_in_page(iomap->inline_data)); in iomap_read_inline_data() 200 memcpy(addr, iomap->inline_data, size); in iomap_read_inline_data() 208 struct iomap *iomap) in iomap_readpage_actor() argument 218 if (iomap->type == IOMAP_INLINE) { in iomap_readpage_actor() 220 iomap_read_inline_data(inode, page, iomap); in iomap_readpage_actor() 229 if (iomap->type != IOMAP_MAPPED || pos >= i_size_read(inode)) { in iomap_readpage_actor() 240 sector = iomap_sector(iomap, pos); in iomap_readpage_actor() 273 bio_set_dev(ctx->bio, iomap->bdev); in iomap_readpage_actor() 354 void *data, struct iomap *iomap) in iomap_readpages_actor() argument [all …]
|
D | fiemap.c | 12 struct iomap prev; 16 struct iomap *iomap, u32 flags) in iomap_to_fiemap() argument 18 switch (iomap->type) { in iomap_to_fiemap() 35 if (iomap->flags & IOMAP_F_MERGED) in iomap_to_fiemap() 37 if (iomap->flags & IOMAP_F_SHARED) in iomap_to_fiemap() 40 return fiemap_fill_next_extent(fi, iomap->offset, in iomap_to_fiemap() 41 iomap->addr != IOMAP_NULL_ADDR ? iomap->addr : 0, in iomap_to_fiemap() 42 iomap->length, flags); in iomap_to_fiemap() 47 struct iomap *iomap) in iomap_fiemap_actor() argument 52 if (iomap->type == IOMAP_HOLE) in iomap_fiemap_actor() [all …]
|
D | direct-io.c | 62 static void iomap_dio_submit_bio(struct iomap_dio *dio, struct iomap *iomap, in iomap_dio_submit_bio() argument 70 dio->submit.last_queue = bdev_get_queue(iomap->bdev); in iomap_dio_submit_bio() 179 iomap_dio_zero(struct iomap_dio *dio, struct iomap *iomap, loff_t pos, in iomap_dio_zero() argument 190 bio_set_dev(bio, iomap->bdev); in iomap_dio_zero() 191 bio->bi_iter.bi_sector = iomap_sector(iomap, pos); in iomap_dio_zero() 198 iomap_dio_submit_bio(dio, iomap, bio); in iomap_dio_zero() 203 struct iomap_dio *dio, struct iomap *iomap) in iomap_dio_bio_actor() argument 205 unsigned int blkbits = blksize_bits(bdev_logical_block_size(iomap->bdev)); in iomap_dio_bio_actor() 218 if (iomap->type == IOMAP_UNWRITTEN) { in iomap_dio_bio_actor() 223 if (iomap->flags & IOMAP_F_SHARED) in iomap_dio_bio_actor() [all …]
|
D | apply.c | 26 struct iomap iomap = { 0 }; in iomap_apply() local 41 ret = ops->iomap_begin(inode, pos, length, flags, &iomap); in iomap_apply() 44 if (WARN_ON(iomap.offset > pos)) in iomap_apply() 46 if (WARN_ON(iomap.length == 0)) in iomap_apply() 53 if (iomap.offset + iomap.length < pos + length) in iomap_apply() 54 length = iomap.offset + iomap.length - pos; in iomap_apply() 61 written = actor(inode, pos, length, data, &iomap); in iomap_apply() 70 flags, &iomap); in iomap_apply()
|
D | seek.c | 122 void *data, struct iomap *iomap) in iomap_seek_hole_actor() argument 124 switch (iomap->type) { in iomap_seek_hole_actor() 168 void *data, struct iomap *iomap) in iomap_seek_data_actor() argument 170 switch (iomap->type) { in iomap_seek_data_actor()
|
D | Makefile | 6 obj-$(CONFIG_FS_IOMAP) += iomap.o 8 iomap-y += \ 15 iomap-$(CONFIG_SWAP) += swapfile.o
|
/fs/xfs/ |
D | xfs_iomap.c | 55 struct iomap *iomap, in xfs_bmbt_to_iomap() argument 65 iomap->addr = IOMAP_NULL_ADDR; in xfs_bmbt_to_iomap() 66 iomap->type = IOMAP_HOLE; in xfs_bmbt_to_iomap() 69 iomap->addr = IOMAP_NULL_ADDR; in xfs_bmbt_to_iomap() 70 iomap->type = IOMAP_DELALLOC; in xfs_bmbt_to_iomap() 72 iomap->addr = BBTOB(xfs_fsb_to_db(ip, imap->br_startblock)); in xfs_bmbt_to_iomap() 74 iomap->type = IOMAP_UNWRITTEN; in xfs_bmbt_to_iomap() 76 iomap->type = IOMAP_MAPPED; in xfs_bmbt_to_iomap() 78 iomap->offset = XFS_FSB_TO_B(mp, imap->br_startoff); in xfs_bmbt_to_iomap() 79 iomap->length = XFS_FSB_TO_B(mp, imap->br_blockcount); in xfs_bmbt_to_iomap() [all …]
|
D | xfs_pnfs.h | 8 struct iomap *iomap, bool write, u32 *device_generation); 9 int xfs_fs_commit_blocks(struct inode *inode, struct iomap *maps, int nr_maps,
|
D | xfs_pnfs.c | 81 struct iomap *iomap, in xfs_fs_map_blocks() argument 181 error = xfs_bmbt_to_iomap(ip, iomap, &imap, false); in xfs_fs_map_blocks() 228 struct iomap *maps, in xfs_fs_commit_blocks()
|
D | xfs_iomap.h | 18 int xfs_bmbt_to_iomap(struct xfs_inode *, struct iomap *,
|
/fs/gfs2/ |
D | bmap.c | 584 struct metapath *mp, struct iomap *iomap) in gfs2_hole_size() argument 599 iomap->length = hole_size << inode->i_blkbits; in gfs2_hole_size() 661 static int gfs2_iomap_alloc(struct inode *inode, struct iomap *iomap, in gfs2_iomap_alloc() argument 669 size_t dblks = iomap->length >> inode->i_blkbits; in gfs2_iomap_alloc() 765 iomap->addr = bn << inode->i_blkbits; in gfs2_iomap_alloc() 766 iomap->flags |= IOMAP_F_MERGED | IOMAP_F_NEW; in gfs2_iomap_alloc() 771 } while (iomap->addr == IOMAP_NULL_ADDR); in gfs2_iomap_alloc() 773 iomap->type = IOMAP_MAPPED; in gfs2_iomap_alloc() 774 iomap->length = (u64)dblks << inode->i_blkbits; in gfs2_iomap_alloc() 841 unsigned flags, struct iomap *iomap, in gfs2_iomap_get() argument [all …]
|
D | file.c | 422 struct iomap iomap = { }; in gfs2_allocate_page_backing() local 424 if (gfs2_iomap_get_alloc(page->mapping->host, pos, length, &iomap)) in gfs2_allocate_page_backing() 427 if (length < iomap.length) in gfs2_allocate_page_backing() 428 iomap.length = length; in gfs2_allocate_page_backing() 429 length -= iomap.length; in gfs2_allocate_page_backing() 430 pos += iomap.length; in gfs2_allocate_page_backing() 942 struct iomap iomap = { }; in fallocate_chunk() local 945 &iomap); in fallocate_chunk() 948 offset = iomap.offset + iomap.length; in fallocate_chunk() 949 if (!(iomap.flags & IOMAP_F_NEW)) in fallocate_chunk() [all …]
|
D | trace_gfs2.h | 509 TP_PROTO(const struct gfs2_inode *ip, struct iomap *iomap, int ret), 511 TP_ARGS(ip, iomap, ret), 527 __entry->offset = iomap->offset; 528 __entry->length = iomap->length; 529 __entry->pblock = iomap->addr == IOMAP_NULL_ADDR ? 0 : 530 (iomap->addr >> ip->i_inode.i_blkbits); 531 __entry->flags = iomap->flags; 532 __entry->type = iomap->type;
|
D | bmap.h | 52 struct iomap *iomap);
|
/fs/ |
D | dax.c | 986 static sector_t dax_iomap_sector(struct iomap *iomap, loff_t pos) in dax_iomap_sector() argument 988 return (iomap->addr + (pos & PAGE_MASK) - iomap->offset) >> 9; in dax_iomap_sector() 991 static int dax_iomap_pfn(struct iomap *iomap, loff_t pos, size_t size, in dax_iomap_pfn() argument 994 const sector_t sector = dax_iomap_sector(iomap, pos); in dax_iomap_pfn() 999 rc = bdev_dax_pgoff(iomap->bdev, sector, size, &pgoff); in dax_iomap_pfn() 1003 length = dax_direct_access(iomap->dax_dev, pgoff, PHYS_PFN(size), in dax_iomap_pfn() 1094 struct iomap *iomap) in dax_iomap_actor() argument 1096 struct block_device *bdev = iomap->bdev; in dax_iomap_actor() 1097 struct dax_device *dax_dev = iomap->dax_dev; in dax_iomap_actor() 1109 if (iomap->type == IOMAP_HOLE || iomap->type == IOMAP_UNWRITTEN) in dax_iomap_actor() [all …]
|
D | internal.h | 10 struct iomap; 43 get_block_t *get_block, struct iomap *iomap);
|
D | buffer.c | 1878 struct iomap *iomap) in iomap_to_bh() argument 1882 bh->b_bdev = iomap->bdev; in iomap_to_bh() 1890 BUG_ON(offset >= iomap->offset + iomap->length); in iomap_to_bh() 1892 switch (iomap->type) { in iomap_to_bh() 1921 if ((iomap->flags & IOMAP_F_NEW) || in iomap_to_bh() 1924 bh->b_blocknr = (iomap->addr + offset - iomap->offset) >> in iomap_to_bh() 1932 get_block_t *get_block, struct iomap *iomap) in __block_write_begin_int() argument 1973 iomap_to_bh(inode, block, bh, iomap); in __block_write_begin_int()
|
D | Makefile | 56 obj-y += iomap/
|
/fs/nfsd/ |
D | blocklayout.c | 31 struct iomap iomap; in nfsd4_block_proc_layoutget() local 51 &iomap, seg->iomode != IOMODE_READ, in nfsd4_block_proc_layoutget() 59 if (iomap.length < args->lg_minlength) { in nfsd4_block_proc_layoutget() 64 switch (iomap.type) { in nfsd4_block_proc_layoutget() 70 bex->soff = iomap.addr; in nfsd4_block_proc_layoutget() 83 bex->soff = iomap.addr; in nfsd4_block_proc_layoutget() 95 WARN(1, "pnfsd: filesystem returned %d extent\n", iomap.type); in nfsd4_block_proc_layoutget() 102 bex->foff = iomap.offset; in nfsd4_block_proc_layoutget() 103 bex->len = iomap.length; in nfsd4_block_proc_layoutget() 105 seg->offset = iomap.offset; in nfsd4_block_proc_layoutget() [all …]
|
D | blocklayoutxdr.h | 8 struct iomap; 57 int nfsd4_block_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp, 59 int nfsd4_scsi_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp,
|
D | blocklayoutxdr.c | 106 nfsd4_block_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp, in nfsd4_block_decode_layoutupdate() 109 struct iomap *iomaps; in nfsd4_block_decode_layoutupdate() 178 nfsd4_scsi_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp, in nfsd4_scsi_decode_layoutupdate() 181 struct iomap *iomaps; in nfsd4_scsi_decode_layoutupdate()
|
/fs/ext2/ |
D | inode.c | 807 unsigned flags, struct iomap *iomap) in ext2_iomap_begin() argument 822 iomap->flags = 0; in ext2_iomap_begin() 823 iomap->bdev = inode->i_sb->s_bdev; in ext2_iomap_begin() 824 iomap->offset = (u64)first_block << blkbits; in ext2_iomap_begin() 825 iomap->dax_dev = sbi->s_daxdev; in ext2_iomap_begin() 828 iomap->type = IOMAP_HOLE; in ext2_iomap_begin() 829 iomap->addr = IOMAP_NULL_ADDR; in ext2_iomap_begin() 830 iomap->length = 1 << blkbits; in ext2_iomap_begin() 832 iomap->type = IOMAP_MAPPED; in ext2_iomap_begin() 833 iomap->addr = (u64)bno << blkbits; in ext2_iomap_begin() [all …]
|
/fs/ext4/ |
D | inode.c | 3443 unsigned flags, struct iomap *iomap) in ext4_iomap_begin() argument 3460 ret = ext4_inline_data_iomap(inode, iomap); in ext4_iomap_begin() 3462 if (ret == 0 && offset >= iomap->length) in ext4_iomap_begin() 3564 iomap->flags = 0; in ext4_iomap_begin() 3567 iomap->flags |= IOMAP_F_DIRTY; in ext4_iomap_begin() 3568 iomap->bdev = inode->i_sb->s_bdev; in ext4_iomap_begin() 3569 iomap->dax_dev = sbi->s_daxdev; in ext4_iomap_begin() 3570 iomap->offset = (u64)first_block << blkbits; in ext4_iomap_begin() 3571 iomap->length = (u64)map.m_len << blkbits; in ext4_iomap_begin() 3574 iomap->type = delalloc ? IOMAP_DELALLOC : IOMAP_HOLE; in ext4_iomap_begin() [all …]
|
D | inline.c | 1840 int ext4_inline_data_iomap(struct inode *inode, struct iomap *iomap) in ext4_inline_data_iomap() argument 1860 iomap->addr = addr; in ext4_inline_data_iomap() 1861 iomap->offset = 0; in ext4_inline_data_iomap() 1862 iomap->length = min_t(loff_t, ext4_get_inline_size(inode), in ext4_inline_data_iomap() 1864 iomap->type = IOMAP_INLINE; in ext4_inline_data_iomap() 1865 iomap->flags = 0; in ext4_inline_data_iomap()
|