| /linux/fs/iomap/ |
| A D | swapfile.c | 15 struct iomap iomap; /* accumulated iomap */ member 32 struct iomap *iomap = &isi->iomap; in iomap_swapfile_add_extent() local 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() 124 memcpy(&isi->iomap, iomap, sizeof(isi->iomap)); in iomap_swapfile_iter() 125 } else if (isi->iomap.addr + isi->iomap.length == iomap->addr) { in iomap_swapfile_iter() 127 isi->iomap.length += iomap->length; in iomap_swapfile_iter() 133 memcpy(&isi->iomap, iomap, sizeof(isi->iomap)); in iomap_swapfile_iter() [all …]
|
| A 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() 47 if (iter->iomap.type == IOMAP_HOLE) in iomap_fiemap_iter() 51 *prev = iter->iomap; in iomap_fiemap_iter() 71 struct iomap prev = { in iomap_fiemap() [all …]
|
| A D | iter.c | 24 bool stale = iter->iomap.flags & IOMAP_F_STALE; in iomap_iter_advance() 27 if (iter->iomap.length) { in iomap_iter_advance() 42 memset(&iter->iomap, 0, sizeof(iter->iomap)); in iomap_iter_advance() 49 WARN_ON_ONCE(iter->iomap.offset > iter->pos); in iomap_iter_done() 50 WARN_ON_ONCE(iter->iomap.length == 0); in iomap_iter_done() 51 WARN_ON_ONCE(iter->iomap.offset + iter->iomap.length <= iter->pos); in iomap_iter_done() 52 WARN_ON_ONCE(iter->iomap.flags & IOMAP_F_STALE); in iomap_iter_done() 54 trace_iomap_iter_dstmap(iter->inode, &iter->iomap); in iomap_iter_done() 78 if (iter->iomap.length && ops->iomap_end) { in iomap_iter() 81 iter->flags, &iter->iomap); in iomap_iter() [all …]
|
| A D | trace.h | 18 #define TRACE_SYSTEM iomap 117 TP_PROTO(struct inode *inode, struct iomap *iomap), 118 TP_ARGS(inode, iomap), 132 __entry->addr = iomap->addr; 135 __entry->type = iomap->type; 137 __entry->bdev = iomap->bdev ? iomap->bdev->bd_dev : 0; 153 TP_PROTO(struct inode *inode, struct iomap *iomap), \ 154 TP_ARGS(inode, iomap)) 160 struct iomap *iomap), 179 __entry->addr = iomap->addr; [all …]
|
| A D | buffered-io.c | 342 const struct iomap *iomap = iomap_iter_srcmap(iter); in iomap_read_inline_data() local 372 const struct iomap *iomap = &iter->iomap; in iomap_readpage_iter() local 673 size_t poff, size_t plen, const struct iomap *iomap) in iomap_read_folio_sync() argument 870 const struct iomap *iomap = &iter->iomap; in iomap_write_end_inline() local 1051 struct iomap *iomap, iomap_punch_t punch) in iomap_write_delalloc_ifs_punch() argument 1081 struct iomap *iomap, iomap_punch_t punch) in iomap_write_delalloc_punch() argument 1089 iomap); in iomap_write_delalloc_punch() 1123 struct iomap *iomap, iomap_punch_t punch) in iomap_write_delalloc_scan() argument 1269 iomap); in iomap_write_delalloc_release() 1275 struct iomap *iomap = &iter->iomap; in iomap_unshare_iter() local [all …]
|
| A D | direct-io.c | 274 const struct iomap *iomap, bool use_fua) in iomap_dio_bio_opflags() argument 293 const struct iomap *iomap = &iter->iomap; in iomap_dio_bio_iter() local 310 if (iomap->type == IOMAP_UNWRITTEN) { in iomap_dio_bio_iter() 315 if (iomap->flags & IOMAP_F_SHARED) in iomap_dio_bio_iter() 318 if (iomap->flags & IOMAP_F_NEW) { in iomap_dio_bio_iter() 320 } else if (iomap->type == IOMAP_MAPPED) { in iomap_dio_bio_iter() 334 (bdev_fua(iomap->bdev) || !bdev_write_cache(iomap->bdev))) in iomap_dio_bio_iter() 399 bio->bi_iter.bi_sector = iomap_sector(iomap, pos); in iomap_dio_bio_iter() 476 const struct iomap *iomap = &iomi->iomap; in iomap_dio_inline_iter() local 483 if (WARN_ON_ONCE(!iomap_inline_data_valid(iomap))) in iomap_dio_inline_iter() [all …]
|
| A 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
|
| /linux/include/linux/ |
| A D | io-mapping.h | 51 iomap->base = base; in io_mapping_init_wc() 52 iomap->size = size; in io_mapping_init_wc() 53 iomap->prot = prot; in io_mapping_init_wc() 54 return iomap; in io_mapping_init_wc() 136 if (!iomap->iomem) in io_mapping_init_wc() 143 return iomap; in io_mapping_init_wc() 209 iomap = kmalloc(sizeof(*iomap), GFP_KERNEL); in io_mapping_create_wc() 210 if (!iomap) in io_mapping_create_wc() 214 kfree(iomap); in io_mapping_create_wc() 218 return iomap; in io_mapping_create_wc() [all …]
|
| A D | iomap.h | 94 struct iomap { struct 110 return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT; in iomap_sector() 118 return iomap->inline_data + pos - iomap->offset; in iomap_inline_data() 189 unsigned flags, struct iomap *iomap, 199 ssize_t written, unsigned flags, struct iomap *iomap); 221 struct iomap iomap; member 236 u64 end = iter->iomap.offset + iter->iomap.length; in iomap_length() 256 return &i->iomap; in iomap_iter_srcmap() 311 struct iomap *iomap); 313 loff_t end_byte, unsigned flags, struct iomap *iomap, [all …]
|
| /linux/drivers/ata/ |
| A D | pata_cs5520.c | 121 void __iomem *iomap[5]; in cs5520_init_one() local 164 iomap[4] = pcim_iomap(pdev, 2, 0); in cs5520_init_one() 166 if (!iomap[0] || !iomap[1] || !iomap[2] || !iomap[3] || !iomap[4]) in cs5520_init_one() 170 ioaddr->cmd_addr = iomap[0]; in cs5520_init_one() 171 ioaddr->ctl_addr = iomap[1]; in cs5520_init_one() 172 ioaddr->altstatus_addr = iomap[1]; in cs5520_init_one() 173 ioaddr->bmdma_addr = iomap[4]; in cs5520_init_one() 181 ioaddr->cmd_addr = iomap[2]; in cs5520_init_one() 182 ioaddr->ctl_addr = iomap[3]; in cs5520_init_one() 183 ioaddr->altstatus_addr = iomap[3]; in cs5520_init_one() [all …]
|
| A D | sata_uli.c | 135 void __iomem * const *iomap; in uli_init_one() local 166 iomap = host->iomap; in uli_init_one() 177 ioaddr->cmd_addr = iomap[0] + 8; in uli_init_one() 180 ((unsigned long)iomap[1] | ATA_PCI_CTL_OFS) + 4; in uli_init_one() 181 ioaddr->bmdma_addr = iomap[4] + 16; in uli_init_one() 192 ioaddr->cmd_addr = iomap[2] + 8; in uli_init_one() 195 ((unsigned long)iomap[3] | ATA_PCI_CTL_OFS) + 4; in uli_init_one() 196 ioaddr->bmdma_addr = iomap[4] + 24; in uli_init_one()
|
| /linux/fs/xfs/ |
| A D | xfs_iomap.c | 75 const struct iomap *iomap) in xfs_iomap_valid() argument 96 struct iomap *iomap, in xfs_bmbt_to_iomap() argument 148 struct iomap *iomap, in xfs_hole_to_iomap() argument 770 struct iomap *iomap, in xfs_direct_write_iomap_begin() argument 938 struct iomap *iomap) in xfs_dax_write_iomap_end() argument 964 struct iomap *iomap, in xfs_buffered_write_iomap_begin() argument 1214 struct iomap *iomap) in xfs_buffered_write_delalloc_punch() argument 1229 struct iomap *iomap) in xfs_buffered_write_iomap_end() argument 1278 struct iomap *iomap, in xfs_read_iomap_begin() argument 1323 struct iomap *iomap, in xfs_seek_iomap_begin() argument [all …]
|
| A D | xfs_aops.c | 204 if (offset < wpc->iomap.offset || in xfs_imap_valid() 205 offset >= wpc->iomap.offset + wpc->iomap.length) in xfs_imap_valid() 212 if (wpc->iomap.flags & IOMAP_F_SHARED) in xfs_imap_valid() 223 trace_xfs_wb_data_iomap_invalid(ip, &wpc->iomap, in xfs_imap_valid() 229 trace_xfs_wb_cow_iomap_invalid(ip, &wpc->iomap, in xfs_imap_valid() 348 xfs_bmbt_to_iomap(ip, &wpc->iomap, &imap, 0, 0, XFS_WPC(wpc)->data_seq); in xfs_map_blocks() 364 &wpc->iomap, seq); in xfs_map_blocks() 387 if (cow_offset < wpc->iomap.offset + wpc->iomap.length) in xfs_map_blocks() 388 wpc->iomap.length = cow_offset - wpc->iomap.offset; in xfs_map_blocks() 391 ASSERT(wpc->iomap.offset <= offset); in xfs_map_blocks() [all …]
|
| A 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,
|
| /linux/fs/gfs2/ |
| A D | bmap.c | 585 struct metapath *mp, struct iomap *iomap) in gfs2_hole_size() argument 841 unsigned flags, struct iomap *iomap, in __gfs2_iomap_get() argument 941 iomap->length = size - iomap->offset; in __gfs2_iomap_get() 1010 struct iomap *iomap, in gfs2_iomap_begin_write() argument 1058 iomap->length, flags, iomap, mp); in gfs2_iomap_begin_write() 1094 unsigned flags, struct iomap *iomap, in gfs2_iomap_begin() argument 1219 struct iomap iomap = { }; in gfs2_block_map() local 1255 struct iomap iomap = { }; in gfs2_get_extent() local 1276 struct iomap iomap = { }; in gfs2_alloc_extent() local 1408 struct iomap *iomap) in gfs2_iomap_get() argument [all …]
|
| A D | bmap.h | 53 struct iomap *iomap); 55 struct iomap *iomap);
|
| /linux/fs/zonefs/ |
| A D | file.c | 29 struct iomap *iomap, struct iomap *srcmap) in zonefs_read_iomap_begin() argument 45 iomap->type = IOMAP_HOLE; 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() 66 struct iomap *iomap, struct iomap *srcmap) in zonefs_write_iomap_begin() argument 93 iomap->addr = (z->z_sector << SECTOR_SHIFT) + iomap->offset; in zonefs_write_iomap_begin() 97 iomap->length = z->z_capacity - iomap->offset; in zonefs_write_iomap_begin() 100 iomap->length = isize - iomap->offset; in zonefs_write_iomap_begin() [all …]
|
| A 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;
|
| /linux/fs/erofs/ |
| A D | data.c | 286 unsigned int flags, struct iomap *iomap, struct iomap *srcmap) in erofs_iomap_begin() argument 308 iomap->offset = map.m_la; in erofs_iomap_begin() 312 iomap->bdev = mdev.m_bdev; in erofs_iomap_begin() 314 iomap->flags = 0; in erofs_iomap_begin() 315 iomap->private = NULL; in erofs_iomap_begin() 318 iomap->type = IOMAP_HOLE; in erofs_iomap_begin() 320 if (!iomap->length) in erofs_iomap_begin() 321 iomap->length = length; in erofs_iomap_begin() 333 iomap->inline_data = ptr; in erofs_iomap_begin() 337 iomap->addr = mdev.m_pa; in erofs_iomap_begin() [all …]
|
| /linux/fs/nfsd/ |
| A D | blocklayout.c | 28 struct iomap iomap; in nfsd4_block_proc_layoutget() local 61 switch (iomap.type) { in nfsd4_block_proc_layoutget() 67 bex->soff = iomap.addr; in nfsd4_block_proc_layoutget() 80 bex->soff = iomap.addr; in nfsd4_block_proc_layoutget() 99 bex->foff = iomap.offset; in nfsd4_block_proc_layoutget() 100 bex->len = iomap.length; in nfsd4_block_proc_layoutget() 102 seg->offset = iomap.offset; in nfsd4_block_proc_layoutget() 103 seg->length = iomap.length; in nfsd4_block_proc_layoutget() 118 struct iomap *iomaps, int nr_iomaps) in nfsd4_block_commit_blocks() 179 struct iomap *iomaps; in nfsd4_block_proc_layoutcommit() [all …]
|
| /linux/Documentation/filesystems/iomap/ |
| A D | porting.rst | 20 There are several reasons to convert a filesystem to iomap: 31 2. Large folios are only supported via iomap; there are no plans to 35 supported via iomap. 42 filesystem using iomap. 54 ``->iomap_end`` if necessary) to allow iomap to obtain a read-only 71 can be tested without needing to implement any iomap APIs. 88 per-operation iomap ops with smaller, more cohesive functions. 94 iomap ops for write operations. 108 interface with iomap and folios. 111 converted to use iomap. [all …]
|
| A D | design.rst | 73 At a high level, an iomap operation `looks like this 94 <https://kernelnewbies.org/KernelProjects/iomap>`_. 98 of the interfaces presented by iomap. 151 ``struct iomap`` 160 struct iomap { 300 unsigned flags, struct iomap *iomap, 301 struct iomap *srcmap); 305 struct iomap *iomap); 341 single iomap mapping. 382 iomap only handles mapping and I/O. [all …]
|
| /linux/fs/ |
| A D | dax.c | 825 static pgoff_t dax_iomap_pgoff(const struct iomap *iomap, loff_t pos) in dax_iomap_pgoff() argument 827 return PHYS_PFN(iomap->addr + (pos & PAGE_MASK) - iomap->offset); in dax_iomap_pgoff() 1263 struct iomap *iomap = &iter->iomap; in dax_unshare_iter() local 1336 const struct iomap *iomap = &iter->iomap; in dax_memzero() local 1359 const struct iomap *iomap = &iter->iomap; in dax_zero_iter() local 1437 const struct iomap *iomap = &iomi->iomap; in dax_iomap_iter() local 1454 if (iomap->type == IOMAP_HOLE || iomap->type == IOMAP_UNWRITTEN) in dax_iomap_iter() 1661 const struct iomap *iomap = &iter->iomap; in dax_fault_iter() local 1676 (iomap->type == IOMAP_UNWRITTEN || iomap->type == IOMAP_HOLE)) { in dax_fault_iter() 2005 const struct iomap *smap = &it_src->iomap; in dax_range_compare_iter() [all …]
|
| /linux/fs/fuse/ |
| A D | dax.c | 388 static void fuse_fill_iomap_hole(struct iomap *iomap, loff_t length) in fuse_fill_iomap_hole() argument 396 struct iomap *iomap, struct fuse_dax_mapping *dmap, in fuse_fill_iomap() argument 433 struct iomap *iomap) in fuse_setup_new_dax_mapping() argument 501 struct iomap *iomap) in fuse_upgrade_dax_mapping() argument 562 unsigned int flags, struct iomap *iomap, in fuse_iomap_begin() argument 576 iomap->offset = pos; in fuse_iomap_begin() 577 iomap->flags = 0; in fuse_iomap_begin() 578 iomap->bdev = NULL; in fuse_iomap_begin() 607 flags, iomap); in fuse_iomap_begin() 621 iomap); in fuse_iomap_begin() [all …]
|
| /linux/fs/hpfs/ |
| A 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()
|