[PATCH v3 0/7] iomap: incremental per-operation iter advance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Here's v3 of the iomap incremental advance series. The most notable
changes in this version are some type fixups that lead to a tweak of
iomap_iter_advance() semantics and folding in a couple more advances in
unshare and zero range that were missed previously.

I also briefly considered a new iomap_iter_advance_full() or some such
helper for cases that have no use for the length variable, but I'm
deferring that because switching back to an s64 return for
iomap_iter_advance() would probably eliminate the need for that.

Christoph,

I dropped the R-b tag for patch 3 because the code changed enough that
it might be worth a second look, but otherwise I don't think the logic
has really changed. With the error passthru removed I think the advance
call from iomap_iter() can ultimately go away when remaining ops are
switched over. This should be able to eventually just check for an error
return, a (non-stale) failure to advance, or otherwise proceed or not
based on iter->len.

Thoughts, reviews, flames appreciated.

Brian

v3:
- Code style and comment fixups.
- Variable type fixups and rework of iomap_iter_advance() to return
  error/length separately.
- Advance the iter on unshare and zero range skip cases instead of
  returning length.
v2: https://lore.kernel.org/linux-fsdevel/20250122133434.535192-1-bfoster@xxxxxxxxxx/
- More refactoring of iomap_iter[_advance]() logic. Lifted out iter
  continuation and stale logic and improved comments.
- Renamed some poorly named helpers and variables.
- Return remaining length for current iter from _iter_advance() and use
  appropriately.
v1: https://lore.kernel.org/linux-fsdevel/20241213143610.1002526-1-bfoster@xxxxxxxxxx/
- Reworked and fixed a bunch of functional issues.
RFC: https://lore.kernel.org/linux-fsdevel/20241125140623.20633-1-bfoster@xxxxxxxxxx/

Brian Foster (7):
  iomap: split out iomap check and reset logic from iter advance
  iomap: factor out iomap length helper
  iomap: refactor iter and advance continuation logic
  iomap: support incremental iomap_iter advances
  iomap: advance the iter directly on buffered writes
  iomap: advance the iter directly on unshare range
  iomap: advance the iter directly on zero range

 fs/iomap/buffered-io.c |  67 +++++++++++++--------------
 fs/iomap/iter.c        | 103 ++++++++++++++++++++++++++---------------
 include/linux/iomap.h  |  27 +++++++++--
 3 files changed, 120 insertions(+), 77 deletions(-)

-- 
2.47.1





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux