Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
340 commits
Select commit Hold shift + click to select a range
a202a50
nstree: simplify rbtree comparison helpers
brauner Oct 29, 2025
560e25e
nstree: add unified namespace list
brauner Oct 29, 2025
76b6f5d
nstree: add listns()
brauner Oct 29, 2025
b36d4b6
arch: hookup listns() system call
brauner Oct 29, 2025
6fc9baa
nsfs: update tools header
brauner Oct 29, 2025
e2b6e5e
selftests/filesystems: remove CLONE_NEWPIDNS from setup_userns() helper
brauner Oct 29, 2025
6bdce84
selftests/namespaces: first active reference count tests
brauner Oct 29, 2025
721c7e4
selftests/namespaces: second active reference count tests
brauner Oct 29, 2025
c6e25d9
selftests/namespaces: third active reference count tests
brauner Oct 29, 2025
28655ff
selftests/namespaces: fourth active reference count tests
brauner Oct 29, 2025
c4803b2
selftests/namespaces: fifth active reference count tests
brauner Oct 29, 2025
47a5fd8
selftests/namespaces: sixth active reference count tests
brauner Oct 29, 2025
4b971b0
selftests/namespaces: seventh active reference count tests
brauner Oct 29, 2025
94f8711
selftests/namespaces: eigth active reference count tests
brauner Oct 29, 2025
a8ce47a
selftests/namespaces: ninth active reference count tests
brauner Oct 29, 2025
e7585a9
selftests/namespaces: tenth active reference count tests
brauner Oct 29, 2025
26d238e
selftests/namespaces: eleventh active reference count tests
brauner Oct 29, 2025
04aee1a
selftests/namespaces: twelth active reference count tests
brauner Oct 29, 2025
2a94bf7
selftests/namespaces: thirteenth active reference count tests
brauner Oct 29, 2025
a9d84bf
selftests/namespaces: fourteenth active reference count tests
brauner Oct 29, 2025
da3c02b
selftests/namespaces: fifteenth active reference count tests
brauner Oct 29, 2025
158c5c7
selftests/namespaces: add listns() wrapper
brauner Oct 29, 2025
e2ff8d8
selftests/namespaces: first listns() test
brauner Oct 29, 2025
6a68c7f
selftests/namespaces: second listns() test
brauner Oct 29, 2025
46909d1
selftests/namespaces: third listns() test
brauner Oct 29, 2025
abac8de
selftests/namespaces: fourth listns() test
brauner Oct 29, 2025
4080b9d
selftests/namespaces: fifth listns() test
brauner Oct 29, 2025
bc8da67
selftests/namespaces: sixth listns() test
brauner Oct 29, 2025
6aeca1d
selftests/namespaces: seventh listns() test
brauner Oct 29, 2025
b0de4c8
selftests/namespaces: eigth listns() test
brauner Oct 29, 2025
674294a
selftests/namespaces: ninth listns() test
brauner Oct 29, 2025
1f8ee4a
selftests/namespaces: first listns() permission test
brauner Oct 29, 2025
ec38237
selftests/namespaces: second listns() permission test
brauner Oct 29, 2025
2635f93
selftests/namespaces: third listns() permission test
brauner Oct 29, 2025
6f360f2
selftests/namespaces: fourth listns() permission test
brauner Oct 29, 2025
1c28817
selftests/namespaces: fifth listns() permission test
brauner Oct 29, 2025
cff6642
selftests/namespaces: sixth listns() permission test
brauner Oct 29, 2025
39bcc7a
selftests/namespaces: seventh listns() permission test
brauner Oct 29, 2025
a1e49d8
selftests/namespaces: first inactive namespace resurrection test
brauner Oct 29, 2025
c0f06da
selftests/namespaces: second inactive namespace resurrection test
brauner Oct 29, 2025
5aec9f4
selftests/namespaces: third inactive namespace resurrection test
brauner Oct 29, 2025
40226da
selftests/namespaces: fourth inactive namespace resurrection test
brauner Oct 29, 2025
2b9fa5b
selftests/namespaces: fifth inactive namespace resurrection test
brauner Oct 29, 2025
aec2237
selftests/namespaces: sixth inactive namespace resurrection test
brauner Oct 29, 2025
54a29d1
selftests/namespaces: seventh inactive namespace resurrection test
brauner Oct 29, 2025
6de17ec
selftests/namespaces: eigth inactive namespace resurrection test
brauner Oct 29, 2025
b9d09f5
selftests/namespaces: ninth inactive namespace resurrection test
brauner Oct 29, 2025
3798991
selftests/namespaces: tenth inactive namespace resurrection test
brauner Oct 29, 2025
c80168b
selftests/namespaces: eleventh inactive namespace resurrection test
brauner Oct 29, 2025
c89d100
selftests/namespaces: twelth inactive namespace resurrection test
brauner Oct 29, 2025
29f083c
selftests/namespace: first threaded active reference count test
brauner Oct 29, 2025
ee86103
selftests/namespace: second threaded active reference count test
brauner Oct 29, 2025
80fedf8
selftests/namespace: third threaded active reference count test
brauner Oct 29, 2025
d18cf3f
selftests/namespace: commit_creds() active reference tests
brauner Oct 29, 2025
fc85885
selftests/namespace: add stress test
brauner Oct 29, 2025
2cc1c01
selftests/namespace: test listns() pagination
brauner Oct 29, 2025
8ebfb98
Merge patch series "nstree: listns()"
brauner Oct 30, 2025
4e97bae
cleanup: fix scoped_class()
brauner Nov 2, 2025
4c7ceeb
cred: add kernel_cred() helper
brauner Nov 2, 2025
40314c2
cred: make init_cred static
brauner Nov 2, 2025
ae40e6c
cred: add scoped_with_kernel_creds()
brauner Nov 2, 2025
b9e3594
firmware: don't copy kernel creds
brauner Nov 2, 2025
4601b79
nbd: don't copy kernel creds
brauner Nov 2, 2025
0f0e7ce
target: don't copy kernel creds
brauner Nov 2, 2025
1ad5b41
unix: don't copy creds
brauner Nov 2, 2025
e0876bd
Merge patch series "creds: add {scoped_}with_kernel_creds()"
brauner Nov 2, 2025
019e52e
cred: add scoped_with_creds() guards
brauner Nov 3, 2025
84c1a32
aio: use credential guards
brauner Nov 3, 2025
4f0a482
backing-file: use credential guards for reads
brauner Nov 3, 2025
f119fea
backing-file: use credential guards for writes
brauner Nov 3, 2025
c3076d1
backing-file: use credential guards for splice read
brauner Nov 3, 2025
b688171
backing-file: use credential guards for splice write
brauner Nov 3, 2025
6e1d1c1
backing-file: use credential guards for mmap
brauner Nov 3, 2025
ff2044c
binfmt_misc: use credential guards
brauner Nov 3, 2025
5e88d1a
erofs: use credential guards
brauner Nov 3, 2025
94afb62
nfs: use credential guards in nfs_local_call_read()
brauner Nov 3, 2025
bff3c84
nfs: use credential guards in nfs_local_call_write()
brauner Nov 3, 2025
f41799b
nfs: use credential guards in nfs_idmap_get_key()
brauner Nov 3, 2025
c5c92c6
smb: use credential guards in cifs_get_spnego_key()
brauner Nov 3, 2025
5db84ab
act: use credential guards in acct_write_process()
brauner Nov 3, 2025
b66c7af
cgroup: use credential guards in cgroup_attach_permissions()
brauner Nov 3, 2025
4037e28
net/dns_resolver: use credential guards in dns_query()
brauner Nov 3, 2025
a857879
Merge patch series "credentials guards: the easy cases"
brauner Nov 3, 2025
c8ad309
cred: add prepare credential guard
brauner Nov 3, 2025
4c5941c
sev-dev: use guard for path
brauner Nov 3, 2025
89c545e
sev-dev: use prepare credential guard
brauner Nov 3, 2025
a945535
selftests/pidfd: update pidfd header
brauner Oct 28, 2025
e12f734
selftests/pidfd: add first supported_mask test
brauner Oct 28, 2025
2593dea
selftests/pidfd: add second supported_mask test
brauner Oct 28, 2025
c71147f
selftests/coredump: split out common helpers
brauner Oct 28, 2025
c09ea66
selftests/coredump: split out coredump socket tests
brauner Oct 28, 2025
32ae9fa
selftests/coredump: fix userspace client detection
brauner Oct 28, 2025
8b64f54
selftests/coredump: fix userspace coredump client detection
brauner Oct 28, 2025
305e6b1
selftests/coredump: handle edge-triggered epoll correctly
brauner Oct 28, 2025
d5694db
selftests/coredump: add debug logging to test helpers
brauner Oct 28, 2025
2343cbe
selftests/coredump: add debug logging to coredump socket tests
brauner Oct 28, 2025
408a0ed
selftests/coredump: add debug logging to coredump socket protocol tests
brauner Oct 28, 2025
32ae33f
selftests/coredump: ignore ENOSPC errors
brauner Oct 28, 2025
619e222
selftests/coredump: add first PIDFD_INFO_COREDUMP_SIGNAL test
brauner Oct 28, 2025
cbb8425
selftests/coredump: add second PIDFD_INFO_COREDUMP_SIGNAL test
brauner Oct 28, 2025
a45ff1c
Merge patch series "coredump: cleanups & pidfd extension"
brauner Oct 30, 2025
390d967
pidfs: reduce wait_pidfd lock scope
brauner Nov 4, 2025
0485a18
fs: rename fs_types.h to fs_dirent.h
brauner Nov 4, 2025
fbc22c2
fs: do not pass a parameter for sync_inodes_one_sb()
adam900710 Nov 3, 2025
2706659
fs: fully sync all fses even for an emergency sync
adam900710 Nov 3, 2025
a4db63b
Merge patch series "fs: fully sync all fsese even for an emergency sync"
brauner Nov 5, 2025
a644682
init: Replace simple_strtoul() with kstrtouint() in root_delay_setup()
kaushlen Nov 3, 2025
d43558a
iomap: track pending read bytes more optimally
joannekoong Sep 26, 2025
fb7a10a
iomap: set accurate iter->pos when reading folio ranges
joannekoong Sep 26, 2025
b2f35ac
iomap: add caller-provided callbacks for read and readahead
joannekoong Sep 26, 2025
c2b1adc
iomap: move buffered io bio logic into new file
Sep 26, 2025
d4e88bb
iomap: make iomap_read_folio() a void return
joannekoong Sep 26, 2025
03e9618
fuse: use iomap for read_folio
joannekoong Sep 26, 2025
f8d9807
filemap: add helper to look up dirty folios in a range
Oct 3, 2025
4ea9071
fuse: use iomap for readahead
joannekoong Sep 26, 2025
4959071
iomap: remove pos+len BUG_ON() to after folio lookup
Oct 3, 2025
93570c6
fuse: remove fc->blkbits workaround for partial writes
joannekoong Sep 26, 2025
395ed1e
iomap: optional zero range dirty folio processing
Oct 3, 2025
4966b46
Merge patch series "fuse: use iomap for buffered reads + readahead"
brauner Sep 29, 2025
5c13dde
xfs: always trim mapping to requested range for zero range
Oct 3, 2025
77c4756
xfs: fill dirty folios on zero range of unwritten mappings
Oct 3, 2025
39be213
iomap: remove old partial eof zeroing optimization
Oct 3, 2025
66d78a1
xfs: error tag to force zeroing on debug kernels
Oct 3, 2025
560507c
Merge patch series "iomap: zero range folio batch support"
brauner Oct 7, 2025
001397f
iomap: add IOMAP_DIO_FSBLOCK_ALIGNED flag
adam900710 Oct 31, 2025
8caec6c
xfs: support sub-block aligned vectors in always COW mode
Oct 31, 2025
ca3557a
Merge patch series "alloc misaligned vectors for zoned XFS v2"
brauner Nov 5, 2025
21215ce
Add error handling to minix filesystem for inode corruption detection
LATENTBOUNCE Nov 4, 2025
d3e0e86
Fix a drop_nlink warning in minix_rmdir
LATENTBOUNCE Nov 4, 2025
009a2ba
Fix a drop_nlink warning in minix_rename
LATENTBOUNCE Nov 4, 2025
0d53451
Merge patch series "Fix two syzbot corruption bugs in minix filesystem"
brauner Nov 5, 2025
e0b62a4
fs: add fs/super_types.h header
brauner Nov 4, 2025
f7b3d14
fs: add fs/super.h header
brauner Nov 4, 2025
723cd98
Merge patch series "fs: start to split up fs.h"
brauner Nov 5, 2025
5b8ed52
fs: inline current_umask() and move it to fs_struct.h
mjguzik Nov 4, 2025
8e4d576
fs: add super_write_guard
brauner Nov 4, 2025
a5e3d0b
btrfs: use super write guard in btrfs_reclaim_bgs_work()
brauner Nov 4, 2025
e79a451
btrfs: use super write guard btrfs_run_defrag_inode()
brauner Nov 4, 2025
6e5b78c
btrfs: use super write guard in sb_start_write()
brauner Nov 4, 2025
2774bac
ext4: use super write guard in write_mmp_block()
brauner Nov 4, 2025
b7b8aca
btrfs: use super write guard in relocating_repair_kthread()
brauner Nov 4, 2025
97f9d2d
open: use super write guard in do_ftruncate()
brauner Nov 4, 2025
ab5f296
xfs: use super write guard in xfs_file_ioctl()
brauner Nov 4, 2025
73fd0db
Merge patch series "fs: introduce super write guard"
brauner Nov 5, 2025
b7b4f75
sev-dev: use override credential guards
brauner Nov 3, 2025
eb93720
coredump: move revert_cred() before coredump_cleanup()
brauner Nov 3, 2025
1ec760f
coredump: pass struct linux_binfmt as const
brauner Nov 3, 2025
313a335
coredump: mark struct mm_struct as const
brauner Nov 3, 2025
af9803d
coredump: split out do_coredump() from vfs_coredump()
brauner Nov 3, 2025
8ed3473
coredump: use prepare credential guard
brauner Nov 3, 2025
545985d
coredump: use override credential guard
brauner Nov 3, 2025
2ed6a34
trace: use prepare credential guard
brauner Nov 3, 2025
06765b6
trace: use override credential guard
brauner Nov 3, 2025
c8e00cd
Merge patch series "credential guards: credential preparation"
brauner Nov 3, 2025
0355dca
ns: don't skip active reference count initialization
brauner Nov 9, 2025
7cd3d20
ns: don't increment or decrement initial namespaces
brauner Nov 9, 2025
2ec2aff
ns: make sure reference are dropped outside of rcu lock
brauner Nov 9, 2025
a51dce7
ns: return EFAULT on put_user() error
brauner Nov 9, 2025
f8d5a89
ns: handle setns(pidfd, ...) cleanly
brauner Nov 9, 2025
57b39aa
ns: add asserts for active refcount underflow
brauner Nov 9, 2025
88efd7c
selftests/namespaces: add active reference count regression test
brauner Nov 9, 2025
3c60b0b
Merge patch "kbuild: Add '-fms-extensions' to areas with dedicated CF…
brauner Nov 10, 2025
aa70b9c
Merge branch 'kbuild-6.19.fms.extension'
brauner Nov 10, 2025
07d7ad4
selftests/namespaces: test for efault
brauner Nov 9, 2025
ae901e5
Merge patch series "ns: fixes for namespace iteration and active refe…
brauner Nov 10, 2025
a67ee4e
Merge branch 'kbuild-6.19.fms.extension'
brauner Nov 11, 2025
2b9a0f2
ns: move namespace types into separate header
brauner Nov 10, 2025
ea1549e
nstree: decouple from ns_common header
brauner Nov 10, 2025
1c64fb0
nstree: move nstree types into separate header
brauner Nov 10, 2025
d12ea80
nstree: add helper to operate on struct ns_tree_{node,root}
brauner Nov 10, 2025
a657bc8
nstree: switch to new structures
brauner Nov 10, 2025
8a30420
nstree: simplify owner list iteration
brauner Nov 10, 2025
298ab06
nstree: use guards for ns_tree_lock
brauner Nov 10, 2025
ed93c06
ns: make is_initial_namespace() argument const
brauner Nov 10, 2025
6bf2538
ns: rename is_initial_namespace()
brauner Nov 10, 2025
d9a4408
fs: use boolean to indicate anonymous mount namespace
brauner Nov 10, 2025
3826d5d
ipc: enable is_ns_init_id() assertions
brauner Nov 10, 2025
657aeb4
ns: make all reference counts on initial namespace a nop
brauner Nov 10, 2025
2b60d56
ns: add asserts for initial namespace reference counts
brauner Nov 10, 2025
7118daa
ns: add asserts for initial namespace active reference counts
brauner Nov 10, 2025
282879a
pid: rely on common reference count behavior
brauner Nov 10, 2025
c2bbd2d
ns: drop custom reference count initialization for initial namespaces
brauner Nov 10, 2025
6453937
selftests/namespaces: fix nsid tests
brauner Nov 10, 2025
18b5c40
Merge patch series "ns: header cleanups and initial namespace referen…
brauner Nov 11, 2025
dca3aa6
fs: move inode fields used during fast path lookup closer together
mjguzik Nov 9, 2025
a0f1cab
iomap: rename bytes_pending/bytes_accounted to bytes_submitted/bytes_…
joannekoong Nov 11, 2025
9d875e0
iomap: account for unaligned end offsets when truncating read range
joannekoong Nov 11, 2025
7e6cea5
docs: document iomap writeback's iomap_finish_folio_write() requirement
joannekoong Nov 11, 2025
6b1fd22
iomap: optimize pending async writeback accounting
joannekoong Nov 11, 2025
f8eaf79
iomap: simplify ->read_folio_range() error handling for reads
joannekoong Nov 11, 2025
a298feb
iomap: simplify when reads can be skipped for writes
joannekoong Nov 11, 2025
854e8df
fs/pipe: stop duplicating union pipe_index declaration
Villemoes Oct 23, 2025
e631df8
fs: speed up path lookup with cheaper handling of MAY_EXEC
mjguzik Nov 7, 2025
3e18f62
btrfs: utilize IOP_FASTPERM_MAY_EXEC
mjguzik Nov 7, 2025
a0a28c4
fs: retire now stale MAY_WRITE predicts in inode_permission()
mjguzik Nov 7, 2025
04f0955
Merge patch series "cheaper MAY_EXEC handling for path lookup"
brauner Nov 11, 2025
50b2a4f
bdev: add hint prints in sb_set_blocksize() for LBS dependency on THP
LiBaokun96 Nov 10, 2025
e41c1f4
fs: touch predicts in do_dentry_open()
mjguzik Nov 9, 2025
21b561d
fs: hide dentry_cache behind runtime const machinery
mjguzik Nov 5, 2025
9eda581
fs: move fd_install() slowpath into a dedicated routine and provide c…
mjguzik Nov 10, 2025
030e86d
fs: touch up predicts in path lookup
mjguzik Nov 5, 2025
cefd55b
nsproxy: fix free_nsproxy() and simplify create_new_namespaces()
brauner Nov 11, 2025
cc7d6c6
nstree: fix kernel-doc comments for internal functions
KRIISHSHARMA Nov 11, 2025
a71e4f1
pidfs: simplify PIDFD_GET_<type>_NAMESPACE ioctls
brauner Nov 17, 2025
c29383a
watch_queue: Use local kmap in post_one_notification()
Nov 18, 2025
6d228c1
fs: remove spurious exports in fs/file_attr.c
Nov 19, 2025
bfef6e1
fs: move mntput_no_expire() slowpath into a dedicated routine
mjguzik Nov 14, 2025
7c17909
fs: add predicts based on nd->depth
mjguzik Nov 19, 2025
8d79ec9
fs: mark lookup_slow() as noinline
mjguzik Nov 19, 2025
37d369f
fs: Add uoff_t
Nov 23, 2025
bef0202
fs/splice.c: trivial fix: pipes -> pipe's
Nov 20, 2025
54ca9e9
include/linux/fs.h: trivial fix: regualr -> regular
Nov 20, 2025
fed9c62
iomap: use find_next_bit() for dirty bitmap scanning
joannekoong Nov 11, 2025
b56c1c5
iomap: use find_next_bit() for uptodate bitmap scanning
joannekoong Nov 11, 2025
f53d302
Merge patch series "iomap: buffered io changes"
brauner Nov 12, 2025
f9f8514
fs, iomap: remove IOCB_DIO_CALLER_COMP
Nov 13, 2025
ddb4873
iomap: always run error completions in user context
Nov 13, 2025
29086a3
iomap: rework REQ_FUA selection
Nov 13, 2025
eca9dc2
iomap: support write completions from interrupt context
Nov 13, 2025
76192a4
iomap: invert the polarity of IOMAP_DIO_INLINE_COMP
Nov 13, 2025
5ec58e6
Merge patch series "enable iomap dio write completions from interrupt…
brauner Nov 14, 2025
d7ff85d
iomap: fix iomap_read_end() for already uptodate folios
joannekoong Nov 18, 2025
7fd8720
iomap: allocate s_dio_done_wq for async reads as well
Nov 24, 2025
a27628f
fs: rework I_NEW handling to operate without fences
mjguzik Oct 10, 2025
4c6b408
fs: cosmetic fixes to lru handling
mjguzik Oct 29, 2025
003a660
fs: push list presence check into inode_io_list_del()
mjguzik Nov 3, 2025
3cd9a42
fs: refactor file timestamp update logic
Nov 20, 2025
7f30e7a
fs: lift the FMODE_NOCMTIME check into file_update_time_flags
Nov 20, 2025
0139836
fs: export vfs_utimes
Nov 20, 2025
ded9958
btrfs: use vfs_utimes to update file timestamps
Nov 20, 2025
f981264
btrfs: fix the comment on btrfs_update_time
Nov 20, 2025
eff094a
orangefs: use inode_update_timestamps directly
Nov 20, 2025
1ed45a4
Merge patch series "re-enable IOCB_NOWAIT writes to files v2"
brauner Nov 26, 2025
9d2a621
fs: tidy up step_into() & friends before inlining
mjguzik Nov 20, 2025
177fdba
fs: inline step_into() and walk_component()
mjguzik Nov 20, 2025
f403e12
Merge patch series "fs: tidy up step_into() & friends before inlining"
brauner Nov 26, 2025
ebf8538
MAINTAINERS: add German Maglione as virtiofs co-maintainer
stefanhaRH Nov 26, 2025
ca0d620
dcache: touch up predicts in __d_lookup_rcu()
mjguzik Nov 27, 2025
7d0a66e
Linux 6.18
torvalds Nov 30, 2025
1885cdb
Merge tag 'vfs-6.19-rc1.iomap' of git://git.kernel.org/pub/scm/linux/…
torvalds Dec 1, 2025
b04b2e7
Merge tag 'vfs-6.19-rc1.misc' of git://git.kernel.org/pub/scm/linux/k…
torvalds Dec 1, 2025
9368f0f
Merge tag 'vfs-6.19-rc1.inode' of git://git.kernel.org/pub/scm/linux/…
torvalds Dec 1, 2025
ebaeabf
Merge tag 'vfs-6.19-rc1.writeback' of git://git.kernel.org/pub/scm/li…
torvalds Dec 1, 2025
415d34b
Merge tag 'namespace-6.19-rc1' of git://git.kernel.org/pub/scm/linux/…
torvalds Dec 1, 2025
212c405
Merge tag 'vfs-6.19-rc1.coredump' of git://git.kernel.org/pub/scm/lin…
torvalds Dec 1, 2025
f2e74ec
Merge tag 'vfs-6.19-rc1.folio' of git://git.kernel.org/pub/scm/linux/…
torvalds Dec 1, 2025
1d18101
Merge tag 'kernel-6.19-rc1.cred' of git://git.kernel.org/pub/scm/linu…
torvalds Dec 1, 2025
afdf0fb
Merge tag 'vfs-6.19-rc1.fs_header' of git://git.kernel.org/pub/scm/li…
torvalds Dec 1, 2025
978d337
Merge tag 'vfs-6.19-rc1.guards' of git://git.kernel.org/pub/scm/linux…
torvalds Dec 1, 2025
4664fb4
Merge tag 'vfs-6.19-rc1.minix' of git://git.kernel.org/pub/scm/linux/…
torvalds Dec 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
50 changes: 46 additions & 4 deletions Documentation/filesystems/iomap/operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,27 @@ These ``struct kiocb`` flags are significant for buffered I/O with iomap:

* ``IOCB_DONTCACHE``: Turns on ``IOMAP_DONTCACHE``.

``struct iomap_read_ops``
--------------------------

.. code-block:: c

struct iomap_read_ops {
int (*read_folio_range)(const struct iomap_iter *iter,
struct iomap_read_folio_ctx *ctx, size_t len);
void (*submit_read)(struct iomap_read_folio_ctx *ctx);
};

iomap calls these functions:

- ``read_folio_range``: Called to read in the range. This must be provided
by the caller. If this succeeds, iomap_finish_folio_read() must be called
after the range is read in, regardless of whether the read succeeded or
failed.

- ``submit_read``: Submit any pending read requests. This function is
optional.

Internal per-Folio State
------------------------

Expand Down Expand Up @@ -182,6 +203,28 @@ The ``flags`` argument to ``->iomap_begin`` will be set to zero.
The pagecache takes whatever locks it needs before calling the
filesystem.

Both ``iomap_readahead`` and ``iomap_read_folio`` pass in a ``struct
iomap_read_folio_ctx``:

.. code-block:: c

struct iomap_read_folio_ctx {
const struct iomap_read_ops *ops;
struct folio *cur_folio;
struct readahead_control *rac;
void *read_ctx;
};

``iomap_readahead`` must set:
* ``ops->read_folio_range()`` and ``rac``

``iomap_read_folio`` must set:
* ``ops->read_folio_range()`` and ``cur_folio``

``ops->submit_read()`` and ``read_ctx`` are optional. ``read_ctx`` is used to
pass in any custom data the caller needs accessible in the ops callbacks for
fulfilling reads.

Buffered Writes
---------------

Expand Down Expand Up @@ -317,6 +360,9 @@ The fields are as follows:
delalloc reservations to avoid having delalloc reservations for
clean pagecache.
This function must be supplied by the filesystem.
If this succeeds, iomap_finish_folio_write() must be called once writeback
completes for the range, regardless of whether the writeback succeeded or
failed.

- ``writeback_submit``: Submit the previous built writeback context.
Block based file systems should use the iomap_ioend_writeback_submit
Expand Down Expand Up @@ -444,10 +490,6 @@ These ``struct kiocb`` flags are significant for direct I/O with iomap:
Only meaningful for asynchronous I/O, and only if the entire I/O can
be issued as a single ``struct bio``.

* ``IOCB_DIO_CALLER_COMP``: Try to run I/O completion from the caller's
process context.
See ``linux/fs.h`` for more details.

Filesystems should call ``iomap_dio_rw`` from ``->read_iter`` and
``->write_iter``, and set ``FMODE_CAN_ODIRECT`` in the ``->open``
function for the file.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/filesystems/porting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ test and set for you.
e.g.::

inode = iget_locked(sb, ino);
if (inode->i_state & I_NEW) {
if (inode_state_read_once(inode) & I_NEW) {
err = read_inode_from_disk(inode);
if (err < 0) {
iget_failed(inode);
Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -27166,6 +27166,7 @@ F: arch/s390/include/uapi/asm/virtio-ccw.h
F: drivers/s390/virtio/

VIRTIO FILE SYSTEM
M: German Maglione <gmaglione@redhat.com>
M: Vivek Goyal <vgoyal@redhat.com>
M: Stefan Hajnoczi <stefanha@redhat.com>
M: Miklos Szeredi <miklos@szeredi.hu>
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VERSION = 6
PATCHLEVEL = 18
SUBLEVEL = 0
EXTRAVERSION = -rc7
EXTRAVERSION =
NAME = Baby Opossum Posse

# *DOCUMENTATION*
Expand Down Expand Up @@ -1061,6 +1061,9 @@ NOSTDINC_FLAGS += -nostdinc
# perform bounds checking.
KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3)

# Allow including a tagged struct or union anonymously in another struct/union.
KBUILD_CFLAGS += -fms-extensions

# disable invalid "can't wrap" optimizations for signed / pointers
KBUILD_CFLAGS += -fno-strict-overflow

Expand Down
1 change: 1 addition & 0 deletions arch/alpha/kernel/syscalls/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -509,3 +509,4 @@
577 common open_tree_attr sys_open_tree_attr
578 common file_getattr sys_file_getattr
579 common file_setattr sys_file_setattr
580 common listns sys_listns
1 change: 1 addition & 0 deletions arch/arm/tools/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -484,3 +484,4 @@
467 common open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr
470 common listns sys_listns
3 changes: 2 additions & 1 deletion arch/arm64/kernel/vdso32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@ VDSO_CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
$(filter -Werror,$(KBUILD_CPPFLAGS)) \
-Werror-implicit-function-declaration \
-Wno-format-security \
-std=gnu11
-std=gnu11 -fms-extensions
VDSO_CFLAGS += -O2
# Some useful compiler-dependent flags from top-level Makefile
VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign)
VDSO_CFLAGS += -fno-strict-overflow
VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes)
VDSO_CFLAGS += -Werror=date-time
VDSO_CFLAGS += $(call cc32-option,-Werror=incompatible-pointer-types)
VDSO_CFLAGS += $(if $(CONFIG_CC_IS_CLANG),-Wno-microsoft-anon-tag)

# Compile as THUMB2 or ARM. Unwinding via frame-pointers in THUMB2 is
# unreliable.
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/tools/syscall_32.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -481,3 +481,4 @@
467 common open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr
470 common listns sys_listns
2 changes: 1 addition & 1 deletion arch/loongarch/vdso/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ccflags-vdso := \
cflags-vdso := $(ccflags-vdso) \
-isystem $(shell $(CC) -print-file-name=include) \
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
-std=gnu11 -O2 -g -fno-strict-aliasing -fno-common -fno-builtin \
-std=gnu11 -fms-extensions -O2 -g -fno-strict-aliasing -fno-common -fno-builtin \
-fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \
$(call cc-option, -fno-asynchronous-unwind-tables) \
$(call cc-option, -fno-stack-protector)
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/kernel/syscalls/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -469,3 +469,4 @@
467 common open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr
470 common listns sys_listns
1 change: 1 addition & 0 deletions arch/microblaze/kernel/syscalls/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -475,3 +475,4 @@
467 common open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr
470 common listns sys_listns
1 change: 1 addition & 0 deletions arch/mips/kernel/syscalls/syscall_n32.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,4 @@
467 n32 open_tree_attr sys_open_tree_attr
468 n32 file_getattr sys_file_getattr
469 n32 file_setattr sys_file_setattr
470 n32 listns sys_listns
1 change: 1 addition & 0 deletions arch/mips/kernel/syscalls/syscall_n64.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -384,3 +384,4 @@
467 n64 open_tree_attr sys_open_tree_attr
468 n64 file_getattr sys_file_getattr
469 n64 file_setattr sys_file_setattr
470 n64 listns sys_listns
1 change: 1 addition & 0 deletions arch/mips/kernel/syscalls/syscall_o32.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -457,3 +457,4 @@
467 o32 open_tree_attr sys_open_tree_attr
468 o32 file_getattr sys_file_getattr
469 o32 file_setattr sys_file_setattr
470 o32 listns sys_listns
2 changes: 1 addition & 1 deletion arch/parisc/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ KBUILD_CFLAGS += -fno-PIE -mno-space-regs -mdisable-fpregs -Os
ifndef CONFIG_64BIT
KBUILD_CFLAGS += -mfast-indirect-calls
endif
KBUILD_CFLAGS += -std=gnu11
KBUILD_CFLAGS += -std=gnu11 -fms-extensions

LDFLAGS_vmlinux := -X -e startup --as-needed -T
$(obj)/vmlinux: $(obj)/vmlinux.lds $(addprefix $(obj)/, $(OBJECTS)) $(LIBGCC) FORCE
Expand Down
1 change: 1 addition & 0 deletions arch/parisc/kernel/syscalls/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,4 @@
467 common open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr
470 common listns sys_listns
3 changes: 2 additions & 1 deletion arch/powerpc/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ BOOTCPPFLAGS := -nostdinc $(LINUXINCLUDE)
BOOTCPPFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include)

BOOTCFLAGS := $(BOOTTARGETFLAGS) \
-std=gnu11 \
-std=gnu11 -fms-extensions \
-Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -O2 \
-msoft-float -mno-altivec -mno-vsx \
Expand All @@ -86,6 +86,7 @@ BOOTARFLAGS := -crD

ifdef CONFIG_CC_IS_CLANG
BOOTCFLAGS += $(CLANG_FLAGS)
BOOTCFLAGS += -Wno-microsoft-anon-tag
BOOTAFLAGS += $(CLANG_FLAGS)
endif

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kernel/syscalls/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -560,3 +560,4 @@
467 common open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr
470 common listns sys_listns
3 changes: 2 additions & 1 deletion arch/s390/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__
ifndef CONFIG_AS_IS_LLVM
KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf))
endif
KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -mpacked-stack -std=gnu11
KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -mpacked-stack -std=gnu11 -fms-extensions
KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY
KBUILD_CFLAGS_DECOMPRESSOR += -D__DECOMPRESSOR
KBUILD_CFLAGS_DECOMPRESSOR += -Wno-pointer-sign
Expand All @@ -35,6 +35,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-membe
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_CC_NO_ARRAY_BOUNDS),-Wno-array-bounds)
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_CC_IS_CLANG),-Wno-microsoft-anon-tag)

UTS_MACHINE := s390x
STACK_SIZE := $(if $(CONFIG_KASAN),65536,$(if $(CONFIG_KMSAN),65536,16384))
Expand Down
1 change: 1 addition & 0 deletions arch/s390/kernel/syscalls/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -472,3 +472,4 @@
467 common open_tree_attr sys_open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr sys_file_setattr
470 common listns sys_listns sys_listns
3 changes: 2 additions & 1 deletion arch/s390/purgatory/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ CFLAGS_sha256.o := -D__NO_FORTIFY
$(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE
$(call if_changed_rule,as_o_S)

KBUILD_CFLAGS := -std=gnu11 -fno-strict-aliasing -Wall -Wstrict-prototypes
KBUILD_CFLAGS := -std=gnu11 -fms-extensions -fno-strict-aliasing -Wall -Wstrict-prototypes
KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
KBUILD_CFLAGS += -Os -m64 -msoft-float -fno-common
KBUILD_CFLAGS += -fno-stack-protector
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
KBUILD_CFLAGS += -D__DISABLE_EXPORTS
KBUILD_CFLAGS += $(CLANG_FLAGS)
KBUILD_CFLAGS += $(if $(CONFIG_CC_IS_CLANG),-Wno-microsoft-anon-tag)
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
KBUILD_AFLAGS += -D__DISABLE_EXPORTS
Expand Down
1 change: 1 addition & 0 deletions arch/sh/kernel/syscalls/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,4 @@
467 common open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr
470 common listns sys_listns
1 change: 1 addition & 0 deletions arch/sparc/kernel/syscalls/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -515,3 +515,4 @@
467 common open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr
470 common listns sys_listns
4 changes: 3 additions & 1 deletion arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ endif

# How to compile the 16-bit code. Note we always compile for -march=i386;
# that way we can complain to the user if the CPU is insufficient.
REALMODE_CFLAGS := -std=gnu11 -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
REALMODE_CFLAGS := -std=gnu11 -fms-extensions -m16 -g -Os \
-DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
Expand All @@ -60,6 +61,7 @@ REALMODE_CFLAGS += $(cc_stack_align4)
REALMODE_CFLAGS += $(CLANG_FLAGS)
ifdef CONFIG_CC_IS_CLANG
REALMODE_CFLAGS += -Wno-gnu
REALMODE_CFLAGS += -Wno-microsoft-anon-tag
endif
export REALMODE_CFLAGS

Expand Down
7 changes: 5 additions & 2 deletions arch/x86/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
# avoid errors with '-march=i386', and future flags may depend on the target to
# be valid.
KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS)
KBUILD_CFLAGS += -std=gnu11
KBUILD_CFLAGS += -std=gnu11 -fms-extensions
KBUILD_CFLAGS += -fno-strict-aliasing -fPIE
KBUILD_CFLAGS += -Wundef
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
Expand All @@ -36,7 +36,10 @@ KBUILD_CFLAGS += -mno-mmx -mno-sse
KBUILD_CFLAGS += -ffreestanding -fshort-wchar
KBUILD_CFLAGS += -fno-stack-protector
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
ifdef CONFIG_CC_IS_CLANG
KBUILD_CFLAGS += -Wno-gnu
KBUILD_CFLAGS += -Wno-microsoft-anon-tag
endif
KBUILD_CFLAGS += -Wno-pointer-sign
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
KBUILD_CFLAGS += -D__DISABLE_EXPORTS
Expand Down
1 change: 1 addition & 0 deletions arch/x86/entry/syscalls/syscall_32.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -475,3 +475,4 @@
467 i386 open_tree_attr sys_open_tree_attr
468 i386 file_getattr sys_file_getattr
469 i386 file_setattr sys_file_setattr
470 i386 listns sys_listns
1 change: 1 addition & 0 deletions arch/x86/entry/syscalls/syscall_64.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@
467 common open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr
470 common listns sys_listns

#
# Due to a historical design error, certain syscalls are numbered differently
Expand Down
1 change: 1 addition & 0 deletions arch/xtensa/kernel/syscalls/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -440,3 +440,4 @@
467 common open_tree_attr sys_open_tree_attr
468 common file_getattr sys_file_getattr
469 common file_setattr sys_file_setattr
470 common listns sys_listns
23 changes: 20 additions & 3 deletions block/bdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static void bdev_write_inode(struct block_device *bdev)
int ret;

spin_lock(&inode->i_lock);
while (inode->i_state & I_DIRTY) {
while (inode_state_read(inode) & I_DIRTY) {
spin_unlock(&inode->i_lock);
ret = write_inode_now(inode, true);
if (ret)
Expand Down Expand Up @@ -217,9 +217,26 @@ int set_blocksize(struct file *file, int size)

EXPORT_SYMBOL(set_blocksize);

static int sb_validate_large_blocksize(struct super_block *sb, int size)
{
const char *err_str = NULL;

if (!(sb->s_type->fs_flags & FS_LBS))
err_str = "not supported by filesystem";
else if (!IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE))
err_str = "is only supported with CONFIG_TRANSPARENT_HUGEPAGE";

if (!err_str)
return 0;

pr_warn_ratelimited("%s: block size(%d) > page size(%lu) %s\n",
sb->s_type->name, size, PAGE_SIZE, err_str);
return -EINVAL;
}

int sb_set_blocksize(struct super_block *sb, int size)
{
if (!(sb->s_type->fs_flags & FS_LBS) && size > PAGE_SIZE)
if (size > PAGE_SIZE && sb_validate_large_blocksize(sb, size))
return 0;
if (set_blocksize(sb->s_bdev_file, size))
return 0;
Expand Down Expand Up @@ -1265,7 +1282,7 @@ void sync_bdevs(bool wait)
struct block_device *bdev;

spin_lock(&inode->i_lock);
if (inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW) ||
if (inode_state_read(inode) & (I_FREEING | I_WILL_FREE | I_NEW) ||
mapping->nrpages == 0) {
spin_unlock(&inode->i_lock);
continue;
Expand Down
5 changes: 3 additions & 2 deletions block/fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,13 @@ const struct address_space_operations def_blk_aops = {
#else /* CONFIG_BUFFER_HEAD */
static int blkdev_read_folio(struct file *file, struct folio *folio)
{
return iomap_read_folio(folio, &blkdev_iomap_ops);
iomap_bio_read_folio(folio, &blkdev_iomap_ops);
return 0;
}

static void blkdev_readahead(struct readahead_control *rac)
{
iomap_readahead(rac, &blkdev_iomap_ops);
iomap_bio_readahead(rac, &blkdev_iomap_ops);
}

static ssize_t blkdev_writeback_range(struct iomap_writepage_ctx *wpc,
Expand Down
Loading
Loading