History log of /linux/fs/fuse/ext_map.c (Results 1 – 8 of 8)
Revision Date Author Comments
# 5f5be658 10-Nov-2026 Linus Torvalds <torvalds@linux-foundation.org>

Merge tag 'vfs-7.4-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

- libfs: Make readdir on tmpfs walk the offset tree in offset order

Merge tag 'vfs-7.4-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

- libfs: Make readdir on tmpfs walk the offset tree in offset order
instead of d_children to avoid skipping entries or relisting the
whole directory

It's faster too. Listing a million entries takes 114ms instead of
146ms, and 113ms instead of 470ms with four processes listing in
parallel

- iomap: Finish the ->iomap_next() conversion that started in v7.3

The nilfs2 and fuse ext_map iomap code added this merge window is
converted so now we can remove the ->iomap_begin()/->iomap_end()
fallback. We waited until the new iomap users from other trees were
in mainline otherwise this would have been very messy

- errseq: Retry with the current value when the cmpxchg() in
errseq_check_and_advance() fails to avoid an old value coming back
later hiding the errors

- aio: Hold an extra count for exit_aio() itself so it can't return
before the last free_ioctx_reqs() callback has called complete()

- pidfd: Fail the namespace ioctls with EREMOTE unless the target is
visible in the caller's pid namespace like PIDFD_GET_INFO does

- eventpoll: Wake the next waiter when a woken waiter returns early
because of a fatal signal to avoid sleeping forever

- backing-file: Pass RWF_NOAPPEND on to synchronous writes to the
backing file

- initrd: Flush the deferred fput() of the ramdisk file before mounting
root

- iov_iter: Take an unsigned long segment count in import_iovec()

The upper 32 bits of the count passed to readv(), writev() and
friends were dropped before the UIO_MAXIOV check

- splice: Advance the pipe tail before checking for a full bvec array
in splice_to_socket(). The last buffer was counted again, so MSG_MORE
was set although the pipe was empty and small TCP transfers waited
for the cork timeout

- vfs:

- Reject negative offsets for SEEK_DATA and SEEK_HOLE in
default_llseek() and use must_set_pos() for its whence handling

- Only clear tv_nsec in timestamp_truncate() when clamping changed
the seconds. Timestamps whose seconds were exactly at a
filesystem time limit lost their subsecond part

- Don't leak the kernel-internal STATX_ATTR_CHANGE_MONOTONIC in
stx_attributes_mask

- Clamp the FIONREAD result to the int range so a file with 4 GiB
left isn't reported as empty

- Fix the SEEK_CUR f_lock check

- selftests: Fix the statmount and mount_setattr tests on 32-bit and
s390, build the fchmodat2 and openat2 tests without sanitizers when
the toolchain lacks the runtimes and fix a clang warning in the
mount-notify test

- docs: Fix a docutils warning in porting.rst

* tag 'vfs-7.4-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (28 commits)
fs: fix the SEEK_CUR f_lock condition
splice, net: avoid MSG_MORE when the bvec array fills
aio: don't let exit_aio() return before complete() is done
fs: porting.rst: use literal string to avoid warning
selftests/fs/mount-notify: fix the indentation in the fsmount test
selftests: probe for sanitizer support in fchmodat2 and openat2
selftests/mount_setattr: build with a 64-bit off_t
selftests/statmount: fix format warnings on 32-bit and s390
fs: use must_set_pos() in default_llseek()
fs: reject negative offsets for SEEK_DATA and SEEK_HOLE in default_llseek()
pidfd: restrict task access ioctls to the caller's pid namespace
fs: clamp FIONREAD result to int range
eventpoll: wake the next waiter when a woken waiter is killed
statx: don't leak STATX_ATTR_CHANGE_MONOTONIC in stx_attributes_mask
vfs: preserve subsecond timestamps at filesystem time limits
iov_iter: take an unsigned long segment count in import_iovec()
lib/tests: errseq: add a concurrent check_and_advance test
errseq: don't let errseq_check_and_advance() hide later errors
backing-file: pass RWF_NOAPPEND to synchronous writes
initrd: flush deferred fput() before mounting root
...

show more ...


# 0af298e6 29-Oct-2026 Kees Cook <kees+treewide@kernel.org>

treewide: refresh kmalloc_obj() conversions

Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte i

treewide: refresh kmalloc_obj() conversions

Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte integers.

The conversions break down as:

435 kzalloc_objs()
169 kmalloc_objs()
52 kvzalloc_objs()
47 kzalloc_obj()
42 kvmalloc_objs()
8 kmalloc_obj()
2 kzalloc_flex()
2 kvmalloc_flex()

and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL.

Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together
with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64,
i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc,
xtensa, and openrisc with GCC 16.2.0 with no new warnings.

Signed-off-by: Kees Cook <kees+treewide@kernel.org>

show more ...


# 9e8fc16d 27-Oct-2026 Joanne Koong <joannelkoong@gmail.com>

iomap: pass iomap_iter_next_fn directly instead of struct iomap_ops

Now that all filesystems implement ->iomap_next() and the legacy
->iomap_begin()/->iomap_end() fallback is gone, struct iomap_ops

iomap: pass iomap_iter_next_fn directly instead of struct iomap_ops

Now that all filesystems implement ->iomap_next() and the legacy
->iomap_begin()/->iomap_end() fallback is gone, struct iomap_ops only
wraps a single iomap_next function pointer. Drop the struct entirely and
pass the iomap_iter_next_fn directly to iomap_iter() and all the
iomap/dax entry points. Filesystems pass their iomap_iter_next_fn
callback directly instead of an ops struct. Several iomap_iter_next_fn
callbacks become non-static and gain header declarations since callers
now reference them directly.

The iomap_iter tracepoint's ops field is renamed to next to match. These
tracepoints are explicitly not stable ABI (see the note in iomap/trace.h).

No functional change intended other than the tracepoint field rename
noted above.

Acked-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://patch.msgid.link/20261027215326.2693300-5-joannelkoong@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>

show more ...


# f6c38b3d 27-Oct-2026 Joanne Koong <joannelkoong@gmail.com>

fuse: convert ext_map iomap ops to ->iomap_next()

Convert the fuse ext_map iomap_ops to the new ->iomap_next() callback.
The callback is generated with the DEFINE_IOMAP_ITER_NEXT() macro, which
wrap

fuse: convert ext_map iomap ops to ->iomap_next()

Convert the fuse ext_map iomap_ops to the new ->iomap_next() callback.
The callback is generated with the DEFINE_IOMAP_ITER_NEXT() macro, which
wraps the iomap_iter_next() helper to finish the previous mapping if
needed and produce the next one. No functional changes are intended.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://patch.msgid.link/20261027215326.2693300-3-joannelkoong@gmail.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>

show more ...


# 5a974561 12-Oct-2026 John Groves <john@groves.net>

fuse: resolve extent maps in O(1) when possible

fuse_ext_map_iomap_begin() runs on every mapping fault of a DAX
extent-mapped file, meaning the TLB-miss-plus-page-table-miss case,
and on every chunk

fuse: resolve extent maps in O(1) when possible

fuse_ext_map_iomap_begin() runs on every mapping fault of a DAX
extent-mapped file, meaning the TLB-miss-plus-page-table-miss case,
and on every chunk of every read/write. These are not page faults in
the usual sense: nothing is read in from storage. The fault only
installs page table entries for memory that is already there, so there
is no I/O to amortize the resolver's cost against; whatever it costs
is added to the cost of a memory access.

The rbtree it walks is built from individually allocated nodes. Each
level is a dependent, un-prefetchable dereference and a potential LLC
miss (~100ns), so a striped file with S strips pays log2(S) of them
per resolution, and that is a large fraction of a mapping fault that
otherwise costs little more than the page table update itself.

Replace the rbtree in struct fuse_backing with a packed, sorted array
of fuse_iext extents, allocated once per map rather than once per
extent. The array packs the extents into the fewest cache lines, and
fault handling is O(1) when the map allows it:

- A cyclic (striped) map is required to have equal-length extents
contiguous from zero, so a file offset converts arithmetically to a
strip index and cycle number. This patch validates that and does
it.

- A simple map whose extents happen to be equal-length and contiguous
from zero (the common famfs allocation) resolves as offset / ext_len.
This patch detects that at populate time and does it.

- An irregular map falls back to a binary search of the packed array.

famfs currently always produces maps that resolve in O(1).

Because the extents are sorted at populate time, a cyclic map's extents
no longer have to arrive in offset order, and the overlap check is an
adjacent-pair compare over the sorted array rather than a check at each
rbtree insertion. Error returns are unchanged: -EIO with a message for
malformed extents and overlaps, -EINVAL for a non-uniform cyclic map.

Signed-off-by: John Groves <john@groves.net>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>

show more ...


# dfc68b6c 21-Sep-2026 Miklos Szeredi <mszeredi@redhat.com>

fuse: add support for striped backing

Add the FUSE_BACKING_MAP_CYCLIC flag for FUSE_NOTIFY_BACKING_MAP
notifications to enable creating striped maps.

This is just a set of regular extents that repe

fuse: add support for striped backing

Add the FUSE_BACKING_MAP_CYCLIC flag for FUSE_NOTIFY_BACKING_MAP
notifications to enable creating striped maps.

This is just a set of regular extents that repeats after the end of the
last extent using a striping pattern (i.e. on the target backings the
stripes have a contiguous footprint).

Two additional limits apply compared to non-cyclic extent map population:

- the size of the extents (chunk size) must be equal

- the extents must start from zero offset and follow each other without
gaps.

Originally-by: John Groves <john@groves.net>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>

show more ...


# e8bc74b6 21-Sep-2026 Miklos Szeredi <mszeredi@redhat.com>

fuse: add extent map I/O support

Wire up read, write, splice and mmap operations for extent-mapped
files through the iomap/DAX infrastructure.

When a passthrough file is opened with an EXTMAP backi

fuse: add extent map I/O support

Wire up read, write, splice and mmap operations for extent-mapped
files through the iomap/DAX infrastructure.

When a passthrough file is opened with an EXTMAP backing, I/O is
dispatched to the dax devices referenced by the extent map.

If an address is not mapped, EIO is returned on the I/O operation.

Originally-by: John Groves <john@groves.net>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>

show more ...


# bf757334 21-Sep-2026 Miklos Szeredi <mszeredi@redhat.com>

fuse: add extent map data structure

Add support for creating and managing extent maps that map file regions to
dax device regions.

Introduce FUSE_NOTIFY_BACKING_MAP for populating extent maps from

fuse: add extent map data structure

Add support for creating and managing extent maps that map file regions to
dax device regions.

Introduce FUSE_NOTIFY_BACKING_MAP for populating extent maps from
userspace.

Extent maps are handled as a new type of backing and are assigned a 64 bit
backing ID by the server.

One extent consists of

- offset within the containing backing
- length of extent
- target backing ID
- offset into target backing

Extents must be non-overlapping, and can only refer to dax device backings
for now.

At this point only support creating and populating the extent map in one
operation, though the interface is not limited by this and later may be
changed, so that partial population of an extent map would be possible.

Originally-by: John Groves <john@groves.net>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>

show more ...