/fs/iomap/ |
D | swapfile.c | 15 struct iomap iomap; /* accumulated iomap */ member 32 struct iomap *iomap = &isi->iomap; in iomap_swapfile_add_extent() local 48 first_ppage = ALIGN(iomap->addr, PAGE_SIZE) >> PAGE_SHIFT; in iomap_swapfile_add_extent() 49 next_ppage = ALIGN_DOWN(iomap->addr + iomap->length, PAGE_SIZE) >> in iomap_swapfile_add_extent() 64 if (iomap->offset == 0) in iomap_swapfile_add_extent() 98 struct iomap *iomap, struct iomap_swapfile_info *isi) in iomap_swapfile_iter() argument 100 switch (iomap->type) { in iomap_swapfile_iter() 113 if (iomap->flags & IOMAP_F_DIRTY) in iomap_swapfile_iter() 115 if (iomap->flags & IOMAP_F_SHARED) in iomap_swapfile_iter() 119 if (iomap->bdev != isi->sis->bdev) in iomap_swapfile_iter() [all …]
|
D | fiemap.c | 13 const struct iomap *iomap, u32 flags) in iomap_to_fiemap() argument 15 switch (iomap->type) { in iomap_to_fiemap() 32 if (iomap->flags & IOMAP_F_MERGED) in iomap_to_fiemap() 34 if (iomap->flags & IOMAP_F_SHARED) in iomap_to_fiemap() 37 return fiemap_fill_next_extent(fi, iomap->offset, in iomap_to_fiemap() 38 iomap->addr != IOMAP_NULL_ADDR ? iomap->addr : 0, in iomap_to_fiemap() 39 iomap->length, flags); in iomap_to_fiemap() 43 struct fiemap_extent_info *fi, struct iomap *prev) in iomap_fiemap_iter() 47 if (iter->iomap.type == IOMAP_HOLE) in iomap_fiemap_iter() 51 *prev = iter->iomap; in iomap_fiemap_iter() [all …]
|
D | iter.c | 13 if (iter->iomap.length) { in iomap_iter_advance() 26 memset(&iter->iomap, 0, sizeof(iter->iomap)); in iomap_iter_advance() 33 WARN_ON_ONCE(iter->iomap.offset > iter->pos); in iomap_iter_done() 34 WARN_ON_ONCE(iter->iomap.length == 0); in iomap_iter_done() 35 WARN_ON_ONCE(iter->iomap.offset + iter->iomap.length <= iter->pos); in iomap_iter_done() 37 trace_iomap_iter_dstmap(iter->inode, &iter->iomap); in iomap_iter_done() 61 if (iter->iomap.length && ops->iomap_end) { in iomap_iter() 64 iter->flags, &iter->iomap); in iomap_iter() 75 &iter->iomap, &iter->srcmap); in iomap_iter()
|
D | direct-io.c | 58 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() 201 bio->bi_iter.bi_sector = iomap_sector(&iter->iomap, pos); in iomap_dio_zero() 216 const struct iomap *iomap, bool use_fua) in iomap_dio_bio_opflags() argument 221 WARN_ON_ONCE(iomap->flags & IOMAP_F_ZONE_APPEND); in iomap_dio_bio_opflags() 225 if (iomap->flags & IOMAP_F_ZONE_APPEND) in iomap_dio_bio_opflags() 241 const struct iomap *iomap = &iter->iomap; in iomap_dio_bio_iter() local 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() 259 if (iomap->type == IOMAP_UNWRITTEN) { in iomap_dio_bio_iter() [all …]
|
D | trace.h | 18 #define TRACE_SYSTEM iomap 111 TP_PROTO(struct inode *inode, struct iomap *iomap), 112 TP_ARGS(inode, iomap), 126 __entry->addr = iomap->addr; 127 __entry->offset = iomap->offset; 128 __entry->length = iomap->length; 129 __entry->type = iomap->type; 130 __entry->flags = iomap->flags; 131 __entry->bdev = iomap->bdev ? iomap->bdev->bd_dev : 0; 147 TP_PROTO(struct inode *inode, struct iomap *iomap), \ [all …]
|
D | buffered-io.c | 217 const struct iomap *iomap = iomap_iter_srcmap(iter); in iomap_read_inline_data() local 218 size_t size = i_size_read(iter->inode) - iomap->offset; in iomap_read_inline_data() 219 size_t poff = offset_in_page(iomap->offset); in iomap_read_inline_data() 220 size_t offset = offset_in_folio(folio, iomap->offset); in iomap_read_inline_data() 229 offset_in_page(iomap->inline_data))) in iomap_read_inline_data() 231 if (WARN_ON_ONCE(size > iomap->length)) in iomap_read_inline_data() 239 memcpy(addr, iomap->inline_data, size); in iomap_read_inline_data() 249 const struct iomap *srcmap = iomap_iter_srcmap(iter); in iomap_block_needs_zeroing() 259 const struct iomap *iomap = &iter->iomap; in iomap_readpage_iter() local 268 if (iomap->type == IOMAP_INLINE) in iomap_readpage_iter() [all …]
|
D | Makefile | 9 obj-$(CONFIG_FS_IOMAP) += iomap.o 11 iomap-y += trace.o \ 13 iomap-$(CONFIG_BLOCK) += buffered-io.o \ 17 iomap-$(CONFIG_SWAP) += swapfile.o
|
/fs/xfs/ |
D | xfs_iomap.c | 54 struct iomap *iomap, in xfs_bmbt_to_iomap() argument 66 iomap->addr = IOMAP_NULL_ADDR; in xfs_bmbt_to_iomap() 67 iomap->type = IOMAP_HOLE; in xfs_bmbt_to_iomap() 70 iomap->addr = IOMAP_NULL_ADDR; in xfs_bmbt_to_iomap() 71 iomap->type = IOMAP_DELALLOC; in xfs_bmbt_to_iomap() 73 iomap->addr = BBTOB(xfs_fsb_to_db(ip, imap->br_startblock)); in xfs_bmbt_to_iomap() 75 iomap->addr += target->bt_dax_part_off; in xfs_bmbt_to_iomap() 78 iomap->type = IOMAP_UNWRITTEN; in xfs_bmbt_to_iomap() 80 iomap->type = IOMAP_MAPPED; in xfs_bmbt_to_iomap() 83 iomap->offset = XFS_FSB_TO_B(mp, imap->br_startoff); in xfs_bmbt_to_iomap() [all …]
|
D | xfs_aops.c | 203 if (offset < wpc->iomap.offset || in xfs_imap_valid() 204 offset >= wpc->iomap.offset + wpc->iomap.length) in xfs_imap_valid() 211 if (wpc->iomap.flags & IOMAP_F_SHARED) in xfs_imap_valid() 260 &wpc->iomap, seq); in xfs_convert_blocks() 263 } while (wpc->iomap.offset + wpc->iomap.length <= offset); in xfs_convert_blocks() 376 xfs_bmbt_to_iomap(ip, &wpc->iomap, &imap, 0, 0); in xfs_map_blocks() 403 if (cow_offset < wpc->iomap.offset + wpc->iomap.length) in xfs_map_blocks() 404 wpc->iomap.length = cow_offset - wpc->iomap.offset; in xfs_map_blocks() 407 ASSERT(wpc->iomap.offset <= offset); in xfs_map_blocks() 408 ASSERT(wpc->iomap.offset + wpc->iomap.length > offset); in xfs_map_blocks()
|
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,
|
/fs/gfs2/ |
D | bmap.c | 582 struct metapath *mp, struct iomap *iomap) in gfs2_hole_size() argument 597 iomap->length = hole_size << inode->i_blkbits; in gfs2_hole_size() 658 static int __gfs2_iomap_alloc(struct inode *inode, struct iomap *iomap, in __gfs2_iomap_alloc() argument 666 size_t dblks = iomap->length >> inode->i_blkbits; in __gfs2_iomap_alloc() 762 iomap->addr = bn << inode->i_blkbits; in __gfs2_iomap_alloc() 763 iomap->flags |= IOMAP_F_MERGED | IOMAP_F_NEW; in __gfs2_iomap_alloc() 768 } while (iomap->addr == IOMAP_NULL_ADDR); in __gfs2_iomap_alloc() 770 iomap->type = IOMAP_MAPPED; in __gfs2_iomap_alloc() 771 iomap->length = (u64)dblks << inode->i_blkbits; in __gfs2_iomap_alloc() 838 unsigned flags, struct iomap *iomap, in __gfs2_iomap_get() argument [all …]
|
D | bmap.h | 53 struct iomap *iomap); 55 struct iomap *iomap);
|
D | file.c | 392 struct iomap iomap = { }; in gfs2_allocate_page_backing() local 394 if (gfs2_iomap_alloc(page->mapping->host, pos, length, &iomap)) in gfs2_allocate_page_backing() 397 if (length < iomap.length) in gfs2_allocate_page_backing() 398 iomap.length = length; in gfs2_allocate_page_backing() 399 length -= iomap.length; in gfs2_allocate_page_backing() 400 pos += iomap.length; in gfs2_allocate_page_backing() 1189 struct iomap iomap = { }; in fallocate_chunk() local 1191 error = gfs2_iomap_alloc(inode, offset, end - offset, &iomap); in fallocate_chunk() 1194 offset = iomap.offset + iomap.length; in fallocate_chunk() 1195 if (!(iomap.flags & IOMAP_F_NEW)) in fallocate_chunk() [all …]
|
D | trace_gfs2.h | 507 TP_PROTO(const struct gfs2_inode *ip, struct iomap *iomap, int ret), 509 TP_ARGS(ip, iomap, ret), 525 __entry->offset = iomap->offset; 526 __entry->length = iomap->length; 527 __entry->pblock = iomap->addr == IOMAP_NULL_ADDR ? 0 : 528 (iomap->addr >> ip->i_inode.i_blkbits); 529 __entry->flags = iomap->flags; 530 __entry->type = iomap->type;
|
/fs/zonefs/ |
D | file.c | 29 struct iomap *iomap, struct iomap *srcmap) in zonefs_read_iomap_begin() argument 41 iomap->bdev = inode->i_sb->s_bdev; in zonefs_read_iomap_begin() 42 iomap->offset = ALIGN_DOWN(offset, sb->s_blocksize); in zonefs_read_iomap_begin() 44 if (iomap->offset >= isize) { in zonefs_read_iomap_begin() 45 iomap->type = IOMAP_HOLE; in zonefs_read_iomap_begin() 46 iomap->addr = IOMAP_NULL_ADDR; in zonefs_read_iomap_begin() 47 iomap->length = length; in zonefs_read_iomap_begin() 49 iomap->type = IOMAP_MAPPED; in zonefs_read_iomap_begin() 50 iomap->addr = (z->z_sector << SECTOR_SHIFT) + iomap->offset; in zonefs_read_iomap_begin() 51 iomap->length = isize - iomap->offset; in zonefs_read_iomap_begin() [all …]
|
D | trace.h | 76 TP_PROTO(struct inode *inode, struct iomap *iomap), 77 TP_ARGS(inode, iomap), 88 __entry->addr = iomap->addr; 89 __entry->offset = iomap->offset; 90 __entry->length = iomap->length;
|
/fs/erofs/ |
D | data.c | 253 unsigned int flags, struct iomap *iomap, struct iomap *srcmap) in erofs_iomap_begin() argument 275 iomap->offset = map.m_la; in erofs_iomap_begin() 277 iomap->dax_dev = mdev.m_daxdev; in erofs_iomap_begin() 279 iomap->bdev = mdev.m_bdev; in erofs_iomap_begin() 280 iomap->length = map.m_llen; in erofs_iomap_begin() 281 iomap->flags = 0; in erofs_iomap_begin() 282 iomap->private = NULL; in erofs_iomap_begin() 285 iomap->type = IOMAP_HOLE; in erofs_iomap_begin() 286 iomap->addr = IOMAP_NULL_ADDR; in erofs_iomap_begin() 287 if (!iomap->length) in erofs_iomap_begin() [all …]
|
D | zmap.c | 768 struct iomap *iomap, struct iomap *srcmap) in z_erofs_iomap_begin_report() argument 778 iomap->bdev = inode->i_sb->s_bdev; in z_erofs_iomap_begin_report() 779 iomap->offset = map.m_la; in z_erofs_iomap_begin_report() 780 iomap->length = map.m_llen; in z_erofs_iomap_begin_report() 782 iomap->type = IOMAP_MAPPED; in z_erofs_iomap_begin_report() 783 iomap->addr = map.m_flags & EROFS_MAP_FRAGMENT ? in z_erofs_iomap_begin_report() 786 iomap->type = IOMAP_HOLE; in z_erofs_iomap_begin_report() 787 iomap->addr = IOMAP_NULL_ADDR; in z_erofs_iomap_begin_report() 797 if (iomap->offset >= inode->i_size) in z_erofs_iomap_begin_report() 798 iomap->length = length + offset - map.m_la; in z_erofs_iomap_begin_report() [all …]
|
/fs/ |
D | dax.c | 806 static pgoff_t dax_iomap_pgoff(const struct iomap *iomap, loff_t pos) in dax_iomap_pgoff() argument 808 return PHYS_PFN(iomap->addr + (pos & PAGE_MASK) - iomap->offset); in dax_iomap_pgoff() 813 pgoff_t pgoff = dax_iomap_pgoff(&iter->iomap, iter->pos); in copy_cow_page_dax() 819 rc = dax_direct_access(iter->iomap.dax_dev, pgoff, 1, DAX_ACCESS, in copy_cow_page_dax() 840 (iter->iomap.flags & IOMAP_F_DIRTY); in dax_fault_is_synchronous() 846 (iter->iomap.flags & IOMAP_F_SHARED); in dax_fault_is_cow() 1052 static int dax_iomap_direct_access(const struct iomap *iomap, loff_t pos, in dax_iomap_direct_access() argument 1055 pgoff_t pgoff = dax_iomap_pgoff(iomap, pos); in dax_iomap_direct_access() 1060 length = dax_direct_access(iomap->dax_dev, pgoff, PHYS_PFN(size), in dax_iomap_direct_access() 1103 const struct iomap *srcmap, void *daddr) in dax_iomap_cow_copy() [all …]
|
/fs/nfsd/ |
D | blocklayout.c | 27 struct iomap iomap; in nfsd4_block_proc_layoutget() local 47 &iomap, seg->iomode != IOMODE_READ, in nfsd4_block_proc_layoutget() 55 if (iomap.length < args->lg_minlength) { in nfsd4_block_proc_layoutget() 60 switch (iomap.type) { in nfsd4_block_proc_layoutget() 66 bex->soff = iomap.addr; in nfsd4_block_proc_layoutget() 79 bex->soff = iomap.addr; in nfsd4_block_proc_layoutget() 91 WARN(1, "pnfsd: filesystem returned %d extent\n", iomap.type); in nfsd4_block_proc_layoutget() 98 bex->foff = iomap.offset; in nfsd4_block_proc_layoutget() 99 bex->len = iomap.length; in nfsd4_block_proc_layoutget() 101 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 | 115 nfsd4_block_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp, in nfsd4_block_decode_layoutupdate() 118 struct iomap *iomaps; in nfsd4_block_decode_layoutupdate() 187 nfsd4_scsi_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp, in nfsd4_scsi_decode_layoutupdate() 190 struct iomap *iomaps; in nfsd4_scsi_decode_layoutupdate()
|
/fs/fuse/ |
D | dax.c | 388 static void fuse_fill_iomap_hole(struct iomap *iomap, loff_t length) in fuse_fill_iomap_hole() argument 390 iomap->addr = IOMAP_NULL_ADDR; in fuse_fill_iomap_hole() 391 iomap->length = length; in fuse_fill_iomap_hole() 392 iomap->type = IOMAP_HOLE; in fuse_fill_iomap_hole() 396 struct iomap *iomap, struct fuse_dax_mapping *dmap, in fuse_fill_iomap() argument 410 iomap->addr = dmap->window_offset + offset; in fuse_fill_iomap() 411 iomap->length = len; in fuse_fill_iomap() 413 iomap->length = ALIGN(len, PAGE_SIZE); in fuse_fill_iomap() 414 iomap->type = IOMAP_MAPPED; in fuse_fill_iomap() 423 WARN_ON_ONCE(iomap->private); in fuse_fill_iomap() [all …]
|
/fs/hpfs/ |
D | file.c | 121 unsigned flags, struct iomap *iomap, struct iomap *srcmap) in hpfs_iomap_begin() argument 131 iomap->bdev = inode->i_sb->s_bdev; in hpfs_iomap_begin() 132 iomap->offset = offset; in hpfs_iomap_begin() 143 iomap->type = IOMAP_MAPPED; in hpfs_iomap_begin() 144 iomap->flags = IOMAP_F_MERGED; in hpfs_iomap_begin() 145 iomap->addr = (u64)s << blkbits; in hpfs_iomap_begin() 146 iomap->length = (u64)n_secs << blkbits; in hpfs_iomap_begin() 148 iomap->type = IOMAP_HOLE; in hpfs_iomap_begin() 149 iomap->addr = IOMAP_NULL_ADDR; in hpfs_iomap_begin() 150 iomap->length = 1 << blkbits; in hpfs_iomap_begin()
|
/fs/ext2/ |
D | inode.c | 803 unsigned flags, struct iomap *iomap, struct iomap *srcmap) in ext2_iomap_begin() argument 818 iomap->flags = 0; in ext2_iomap_begin() 819 iomap->offset = (u64)first_block << blkbits; in ext2_iomap_begin() 821 iomap->dax_dev = sbi->s_daxdev; in ext2_iomap_begin() 823 iomap->bdev = inode->i_sb->s_bdev; in ext2_iomap_begin() 826 iomap->type = IOMAP_HOLE; in ext2_iomap_begin() 827 iomap->addr = IOMAP_NULL_ADDR; in ext2_iomap_begin() 828 iomap->length = 1 << blkbits; in ext2_iomap_begin() 830 iomap->type = IOMAP_MAPPED; in ext2_iomap_begin() 831 iomap->addr = (u64)bno << blkbits; in ext2_iomap_begin() [all …]
|