Skip to content

Commit 0ee7c3e

Browse files
committed
Merge tag 'iomap-5.15-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull iomap updates from Darrick Wong: "The most notable externally visible change for this cycle is the addition of support for reads to inline tail fragments of files, which was requested by the erofs developers; and a correction for a kernel memory corruption bug if the sysadmin tries to activate a swapfile with more pages than the swapfile header suggests. We also now report writeback completion errors to the file mapping correctly, instead of munging all errors into EIO. Internally, the bulk of the changes are Christoph's patchset to reduce the indirect function call count by a third to a half by converting iomap iteration from a loop pattern to a generator/consumer pattern. As an added bonus, fsdax no longer open-codes iomap apply loops. Summary: - Simplify the bio_end_page usage in the buffered IO code. - Support reading inline data at nonzero offsets for erofs. - Fix some typos and bad grammar. - Convert kmap_atomic usage in the inline data read path. - Add some extra inline data input checking. - Fix a memory corruption bug stemming from iomap_swapfile_activate trying to activate more pages than mm was expecting. - Pass errnos through the page writeback code so that writeback errors are reported correctly instead of being munged to EIO. - Replace iomap_apply with a open-coded iterator loops to reduce the number of indirect calls by a third to a half. - Refactor the fsdax code to use iomap iterators instead of the open-coded iomap_apply code that it had before. - Format file range iomap tracepoint data in hexadecimal and standardize the names used in the pretty-print string" * tag 'iomap-5.15-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (41 commits) iomap: standardize tracepoint formatting and storage mm/swap: consider max pages in iomap_swapfile_add_extent iomap: move loop control code to iter.c iomap: constify iomap_iter_srcmap fsdax: switch the fault handlers to use iomap_iter fsdax: factor out a dax_fault_actor() helper fsdax: factor out helpers to simplify the dax fault code iomap: rework unshare flag iomap: pass an iomap_iter to various buffered I/O helpers iomap: remove iomap_apply fsdax: switch dax_iomap_rw to use iomap_iter iomap: switch iomap_swapfile_activate to use iomap_iter iomap: switch iomap_seek_data to use iomap_iter iomap: switch iomap_seek_hole to use iomap_iter iomap: switch iomap_bmap to use iomap_iter iomap: switch iomap_fiemap to use iomap_iter iomap: switch __iomap_dio_rw to use iomap_iter iomap: switch iomap_page_mkwrite to use iomap_iter iomap: switch iomap_zero_range to use iomap_iter iomap: switch iomap_file_unshare to use iomap_iter ...
2 parents 916d636 + 03b8df8 commit 0ee7c3e

File tree

15 files changed

+922
-934
lines changed

15 files changed

+922
-934
lines changed

fs/btrfs/inode.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8247,9 +8247,10 @@ static struct btrfs_dio_private *btrfs_create_dio_private(struct bio *dio_bio,
82478247
return dip;
82488248
}
82498249

8250-
static blk_qc_t btrfs_submit_direct(struct inode *inode, struct iomap *iomap,
8250+
static blk_qc_t btrfs_submit_direct(const struct iomap_iter *iter,
82518251
struct bio *dio_bio, loff_t file_offset)
82528252
{
8253+
struct inode *inode = iter->inode;
82538254
const bool write = (btrfs_op(dio_bio) == BTRFS_MAP_WRITE);
82548255
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
82558256
const bool raid56 = (btrfs_data_alloc_profile(fs_info) &
@@ -8265,7 +8266,7 @@ static blk_qc_t btrfs_submit_direct(struct inode *inode, struct iomap *iomap,
82658266
int ret;
82668267
blk_status_t status;
82678268
struct btrfs_io_geometry geom;
8268-
struct btrfs_dio_data *dio_data = iomap->private;
8269+
struct btrfs_dio_data *dio_data = iter->iomap.private;
82698270
struct extent_map *em = NULL;
82708271

82718272
dip = btrfs_create_dio_private(dio_bio, inode, file_offset);

fs/buffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,7 @@ EXPORT_SYMBOL(page_zero_new_buffers);
19121912

19131913
static void
19141914
iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh,
1915-
struct iomap *iomap)
1915+
const struct iomap *iomap)
19161916
{
19171917
loff_t offset = block << inode->i_blkbits;
19181918

@@ -1966,7 +1966,7 @@ iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh,
19661966
}
19671967

19681968
int __block_write_begin_int(struct page *page, loff_t pos, unsigned len,
1969-
get_block_t *get_block, struct iomap *iomap)
1969+
get_block_t *get_block, const struct iomap *iomap)
19701970
{
19711971
unsigned from = pos & (PAGE_SIZE - 1);
19721972
unsigned to = from + len;

0 commit comments

Comments
 (0)