Merge tag 'ext4_for_linus-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 updates from Ted Ts'o:
"The bulk of the new lines was caused by adding KUnit tests, which
makes it safer to validate AI generated patches.
Three minor performance provements:
- Spread the inodes of files in sibling directories over the block
groups of a flex group. This avoids contention on the inode table
buffer locks and significantly speeds up parallel file creation
- Move the orphan list tracking fields in ext4_sb_info off the cache
line shared with the journal state, which improves unlink
performance on file systems without the orphan_file feature
- Speed up fast commit replay for sparse files by skipping holes when
shrinking the extent tree.
[83 lines not shown]
Merge tag 'kbuild-fixes-7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux
Pull Kbuild fixes from Nathan Chancellor:
- Move GCC 17's implementation of -Wconstant-logical-operand to W=2
to fix builds with -Werror
- Disable LLVM's flow-based profile inference algorithm (Profi) for
AutoFDO, which can degrade runtime performance and cause pathological
compilation time issues
* tag 'kbuild-fixes-7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux:
kbuild: AutoFDO: Disable Profi (-fno-sample-profile-use-profi)
kbuild: move gcc's -Wconstant-logical-operand to W=2
sched/wait: remove the __add_wait_queue_*exclusive() helpers
Each has one or two special-case users. Open-code them there: set
WQ_FLAG_EXCLUSIVE and queue the entry directly, with a note on why the
caller doesn't use add_wait_queue_exclusive().
I think all cases (eventpoll, orangefs and ubifs) are unnecessary and
could just use the regular ordering, but I'll leave that to those
maintainers to sort out.
Cc: Oleg Nesterov <oleg at redhat.com>
Cc: Ingo Molnar <mingo at redhat.com>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Juri Lelli <juri.lelli at redhat.com>
Cc: Vincent Guittot <vincent.guittot at linaro.org>
Cc: Alexander Viro <viro at zeniv.linux.org.uk> # eventpoll
Cc: Christian Brauner <brauner at kernel.org> # eventpoll
Cc: Jan Kara <jack at suse.cz> # eventpoll
Cc: Mike Marshall <hubcap at omnibond.com> # orangefs
[2 lines not shown]
sched/wait: remove __add_wait_queue_entry_tail()
__add_wait_queue() and __add_wait_queue_entry_tail() are now the same.
Cc: Oleg Nesterov <oleg at redhat.com>
Cc: Ingo Molnar <mingo at redhat.com>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Juri Lelli <juri.lelli at redhat.com>
Cc: Vincent Guittot <vincent.guittot at linaro.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
sched/wait: always queue new waiters at the tail
Non-exclusive waiters have been added at the head and exclusive ones at
the tail, so that an exclusive wakeup stopping early still woke every
non-exclusive waiter.
That only matters for waiters that mix both kinds on one queue like
read() and poll() on a pipe - and even then it doesn't actually buy
anything but complexity and fragility of the code.
An exclusive reader consumes the event, the poller had nothing to see,
so there's no real point in keeping the two ordered.
The pointless ordering results in a special rule for everybody adding
themselves to the wait queue, and that rule has not been consistently
followed anyway (see for example do_wait_intr() and do_wait_intr_irq())
So just queue everyone in FIFO order. LIFO might be better for
throughput, but every time we've ever tried that optimization in real
[22 lines not shown]
io_uring/poll: don't claim real exclusivity for EPOLLEXCLUSIVE
Same problem as epoll: an EPOLLEXCLUSIVE poll request returns 1 from
io_poll_wake() (even when it lost the ownership race and does nothing),
which stops the wakeup walk, but posting a CQE doesn't consume the
event.
Waiters queued behind it can sleep with the event pending.
Use WQ_FLAG_POLL_EXCLUSIVE, so only one io_uring entry is woken but real
waiters are not skipped.
Reported-by: Mani Tofigh <mt4022 at columbia.edu>
Cc: Jens Axboe <axboe at kernel.dk>
Cc: Oleg Nesterov <oleg at redhat.com>
Cc: Ingo Molnar <mingo at redhat.com>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Juri Lelli <juri.lelli at redhat.com>
Cc: Vincent Guittot <vincent.guittot at linaro.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
eventpoll: don't claim real exclusivity for EPOLLEXCLUSIVE
An EPOLLEXCLUSIVE entry that wakes an epoll_wait()er returns 1, and
because it was queued as an exclusive waiter that stops the wakeup walk.
But nothing makes the epoll user consume the event: it may be killed,
time out, pick another ready fd, or just not read. Anything queued
behind the entry - a blocked pipe reader, an accept()er, a recv()er -
then sleeps with the event pending.
Queue it with WQ_FLAG_POLL_EXCLUSIVE instead: still only one epoll
instance is woken per wakeup, but real waiters are not skipped.
Reported-by: Mani Tofigh <mt4022 at columbia.edu>
Cc: Christian Brauner <brauner at kernel.org>
Cc: Oleg Nesterov <oleg at redhat.com>
Cc: Ingo Molnar <mingo at redhat.com>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Juri Lelli <juri.lelli at redhat.com>
[2 lines not shown]
sched/wait: add WQ_FLAG_POLL_EXCLUSIVE for user space waiters
An exclusive waiter whose wake function returns a positive return value
to indicate that it has successfully been woken up stops the wakeup
walk, on the understanding that it will handle the event.
However, user space consumers - like eventpoll or io_uring - want to be
woken up, and want to avoid the thundering herd issue. So they used an
exclusive wait - but without any actual guarantee that they will then
meaningfully handle the event.
So the wakeup could be lost, and real waiters would be left pending.
Add a separate flag for these kind of "exclusive poll" cases, which is
effectively what these user space waiters are. Only the first such
entry that accepts a wakeup is woken, as now, but they don't count
against nr_exclusive and it doesn't stop the walk.
Wake-all (nr_exclusive == 0, including POLLFREE) still calls every entry.
[9 lines not shown]
sctp: don't let a blocked reader take write-space wakeups
sctp_wait_for_packet() waits exclusively on sk_sleep() with the default
autoremove wake function, so it accepts any wakeup and consumes it.
Then __sctp_write_space() sends EPOLLOUT with a wake-one wakeup:
sctp_wait_for_packet() wakes up, finds no data, goes back to sleep, and
the walk stops.
End result: anybody else queued behind it that was waiting for EPOLLOUT
will never see it.
Filter on EPOLLIN | EPOLLERR like receiver_wake_function() in
net/core/datagram.c. State changes (using sock_def_wakeup()) use an
unkeyed wake-all and still get through and will ignore the exclusive
nature of sctp_wait_for_packet().
Cc: Oleg Nesterov <oleg at redhat.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
[5 lines not shown]
Merge tag 'hid-for-linus-2026112301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID fixes from Jiri Kosina:
"Mostly functional code fixes all over the place, plus a few new device
IDs support.
The amount of patches is slightly higher than I'd like to see for rc4,
and there are two reasons for it -- the amount of patches is much
higher overall, due to all the AI fixes coming to the driver land, and
both myself and Benjamin have been pretty much unable to process
incoming patches for a past couple weeks for various reasons; but
we're getting back on track"
* tag 'hid-for-linus-2026112301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (42 commits)
HID: nintendo: release the player ID when LED setup fails
HID: quirks: add ALWAYS_POLL quirk for Keychron Link receiver
HID: wacom: Prevent NULL dereference in wireless work
HID: intel-thc-hid: intel-quickspi: validate GET REPORT response size
HID: apple: Add "F108Pro Dongle" to the list of non-apple keyboards
[16 lines not shown]
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fixes from Paolo Bonzini:
"A large set of fixes, mostly for Arm but almost all architectures
are represented.
arm64 MMU fixes:
- Correctly sanitise the TCR_EL2 register
- Stop advertising LPA2 to NV guest when it isn't supported
- Correctly convert EH2==0's view of TCR_EL2 into the E2H==1 format
- Make sure an EL2 mapping is immediately visible to the hypervisor
code, as we don't necessarily require ETS
- Address a horrible situation where a guest can livelock when trying
to solve a permission fault whilst the underlying S2 PTs have AF=0
[192 lines not shown]
ext4: add KUnit tests for fs/ext4/mmp.c
Add a KUnit test suite (ext4_mmp_test) covering multi-mount protection
checksums, block I/O validation, and mount state transitions in
fs/ext4/mmp.c:
- CRC32C generation and verification in ext4_mmp_csum_set() and
ext4_mmp_csum_verify() with and without METADATA_CSUM
- Block read/write error handling, magic validation (-EFSCORRUPTED),
CRC mismatch handling (-EFSBADCRC), and buffer cleanup in
read_mmp_block() and write_mmp_block()
- ext4_multi_mount_protect() validation of out-of-range MMP blocks,
EXT4_MMP_SEQ_FSCK rejection (-EBUSY), EXT4_MMP_SEQ_CLEAN claim and
ext4_stop_mmpd() teardown, active/racing node sequence conflicts,
check_interval clamping, interrupted waits (-ETIMEDOUT), and kthread
startup failure
Signed-off-by: Theodore Ts'o <tytso at mit.edu>
ext4: add KUnit tests for fs/ext4/move_extent.c
Add a KUnit test suite (ext4_move_extent_test) covering online extent
swapping and validation helpers in fs/ext4/move_extent.c:
- Ordered i_data_sem lock acquisition/release in
ext4_double_down_write_data_sem() and ext4_double_up_write_data_sem()
- File, feature, and mode checks in mext_check_validity() (same inode,
cross-sb, non-regular, bigalloc, DAX, data journaling, encrypted,
non-extent, SUID/SGID, immutable/append, swapfile, quota, zero size)
- Sub-page alignment, EXT_MAX_BLOCKS bounds, and EOF clamping in
mext_check_adjust_range()
- End-to-end ext4_move_extents() across origin/donor holes, unwritten
extent moves, written MEXT_COPY_DATA with extent splitting and page
cache preservation, unwritten-origin zeroing, and -EBUSY release
Signed-off-by: Theodore Ts'o <tytso at mit.edu>
ext4: add KUnit regression tests for inode migration fixes
Add KUnit regression tests in fs/ext4/migrate-test.c covering the
ext4_ext_migrate() bug fixes in the tree:
- test_ext_migrate_caps_long_run_at_init_max_len(): verify that a
contiguous run longer than EXT_INIT_MAX_LEN is split into multiple
initialized extents, covering commit b0a3f2c102e8 ("ext4: cap
migration extent length at EXT_INIT_MAX_LEN").
- test_ext_migrate_survives_handle_restart(): verify that a handle
restart during extent insertion does not abort migration, covering
commit 3b6aee59883c ("ext4: clear journal restart indication after
inserting extent").
- test_ext_migrate_reports_concurrent_allocation() and an -EIO check in
test_ext_migrate_error_rollback_frees_tmp_extent_blocks(): verify that
migration errors are returned to the caller instead of being
overwritten, covering commit 82e2a5743b6a ("ext4: don't clobber the
migration error in ext4_ext_migrate()").
- test_ext_migrate_credit_or_dirty_failure_keeps_live_blocks(): verify
[15 lines not shown]
ext4: add KUnit tests for fs/ext4/dir.c
Add a KUnit test suite (ext4_dir_test) in fs/ext4/dir-test.c covering
directory entry validation, hash-cookie helpers, directory llseek, and
both linear and HTree directory iteration in fs/ext4/dir.c:
- __ext4_check_dir_entry() and ext4_check_all_de() validation across
valid blocks (including fake '.', '..', and metadata_csum tail
entries, as well as encrypted+casefolded extended-hash entries) and
corrupt rec_len, alignment, name_len, block-end slack, overrun,
out-of-bounds inode numbers, and full-block '.' entries.
- is_dx_dir(), get_dtype(), and 32-bit vs 64-bit HTree telldir hash
position conversions (hash2pos, pos2maj_hash, pos2min_hash, and
ext4_get_htree_eof).
- ext4_dir_operations open(), llseek() (64-bit and 32-bit HTree EOF
bounds vs non-DX s_bitmap_maxbytes/SEEK_END bounds and cookie
invalidation), and release().
- ext4_htree_store_dirent() rbtree ordering across major/minor hashes,
64-bit hash collision chaining, and ext4_htree_free_dir_info().
[13 lines not shown]
ext4: expand KUnit tests in fs/ext4/extents-test.c for file range operations
Expand ext4_extents_test to cover high-level file-range operations and
reporting entry points in fs/ext4/extents.c:
- ext4_fallocate() mode validation (unsupported flags, encrypted
collapse/insert rejection, FALLOC_FL_WRITE_ZEROES device limit check,
non-extent inode rejection), preallocation with and without
FALLOC_FL_KEEP_SIZE, and hole punching via FALLOC_FL_PUNCH_HOLE
- ext4_zero_range() via FALLOC_FL_ZERO_RANGE (written-to-unwritten split
and EOF extension) and FALLOC_FL_WRITE_ZEROES (block zeroouts,
unwritten-to-written conversion, and orphan tracking across EOF)
- ext4_collapse_range() alignment/EOF validation, block freeing,
left-shift of trailing extents, and adjacent extent coalescing
- ext4_insert_range() alignment/EOF/maxbytes validation, mid-extent
splitting, right-shift of trailing extents, and i_size growth
- ext4_convert_unwritten_extents(),
ext4_convert_unwritten_extents_atomic(), and
ext4_convert_unwritten_io_end_vec() IO completion conversions
[4 lines not shown]
ext4: add KUnit tests for fs/ext4/migrate.c
Add the ext4_migrate_test KUnit suite in fs/ext4/migrate-test.c to test
online inode format migration between indirect block maps and extent
trees in fs/ext4/migrate.c:
- ext4_ext_migrate() precondition guards, fast symlink no-op handling,
and temporary inode allocation error propagation
- direct and single-indirect physically contiguous block coalescing,
sparse logical hole preservation, and indirect metadata freeing
- double-indirect and triple-indirect tree traversal and multi-level
extent tree construction with proper i_csum_seed propagation
- error rollback freeing allocated temporary extent tree blocks while
preserving the original indirect inode layout
- ext4_ext_swap_inode_data() concurrent block allocation detection via
EXT4_STATE_EXT_MIGRATE (-EAGAIN)
- ext4_ind_migrate() conversion of empty and single-extent inodes back
to direct block maps and rejection of unsupported layouts
[4 lines not shown]
ext4: add KUnit tests for fs/ext4/super.c
Add a KUnit test suite (ext4_super_test) covering superblock validation,
geometry checks, metadata checksums, mount options, overhead/statfs
accounting, and persistent error recording in fs/ext4/super.c:
- Feature flag compatibility in ext4_feature_set_ok() and
ext4_check_feature_compatibility() across RW/RO mounts, bigalloc
constraints, Hurd creator-OS restrictions, DAX, and encryption levels.
- Inode, block-group, cluster-size, and directory hash initialization in
ext4_inode_info_init(), ext4_block_group_meta_init(),
ext4_handle_clustersize(), and ext4_hash_info_init().
- Filesystem geometry validation in ext4_check_geometry(), descriptor
location arithmetic in descriptor_loc() (linear and meta_bg),
superblock and group descriptor CRC16/CRC32C verification, descriptor
overlap checks in ext4_check_descriptors(), and flex_bg counter
aggregation in ext4_fill_flex_info() / ext4_alloc_flex_bg_array().
- Maximum file size helpers ext4_max_size() / ext4_max_bitmap_size(),
stripe selection in ext4_get_stripe_size(), reserved cluster defaults
[8 lines not shown]
ext4: add KUnit tests for fs/ext4/resize.c
Add a KUnit test suite (ext4_resize_test) covering online filesystem
resizing, group validation, flex_bg table packing, backup descriptor
reservation, and meta_bg conversion in fs/ext4/resize.c:
- Precondition checks in ext4_resize_begin() and EXT4_FLAGS_RESIZING
mutual exclusion with ext4_resize_end().
- Backup group iteration in ext4_list_backups() (sparse_super powers of
3/5/7, dense non-sparse sequence, and sparse_super2 s_backup_bgs) and
reserved GDT validation in verify_reserved_gdb().
- Group geometry and overlap validation in verify_group_input() across
partial prior groups, reserved-block ratios, out-of-bounds bitmaps and
inode tables, bitmap collisions, and superblock/GDT overhead overlaps.
- Flex group batch sizing in alloc_flex_gd(), descriptor flag and
partial-group initialization in ext4_setup_next_flex_gd(), and packed
metadata table placement and -ENOSPC handling in
ext4_alloc_group_tables().
- Online partial-last-group extension in ext4_group_extend() updating
[13 lines not shown]
ext4: add KUnit tests for fs/ext4/indirect.c
Add the ext4_indirect_test KUnit suite in fs/ext4/indirect-test.c to
test legacy direct, single-, double-, and triple-indirect block mapping,
truncation, and hole punching in fs/ext4/indirect.c:
- ext4_block_to_path() offset decomposition, boundary distance, and
out-of-range block rejection, plus ext4_ind_trans_blocks() credits
- ext4_ind_map_blocks() read-only lookup across contiguous runs,
EXT4_MAP_BOUNDARY detection, and multi-level hole span calculation
- ext4_ind_map_blocks() allocation and branch splicing across direct,
IND, DIND, and TIND depths
- error handling (out-of-range logical/physical blocks, bigalloc
rejection, indirect read I/O failure, corrupt indirect blockref) and
partial branch allocation unwind freeing intermediate metadata blocks
- ext4_ind_truncate() partial shared-branch truncation, indirect root
detachment, and full truncation to zero
- ext4_ind_remove_space() hole punching within direct blocks, across
mixed levels, and converging on shared IND and DIND blocks
[8 lines not shown]
ext4: add KUnit tests for fs/ext4/block_validity.c
Add the ext4_block_validity_test KUnit test suite in
fs/ext4/block_validity-test.c (16 test cases, 40 subtests total) to
comprehensively exercise system-zone rbtree construction, RCU release,
block range validation, reserved journal inode protection, and indirect
block reference checking in fs/ext4/block_validity.c using an in-memory
VFS superblock and mock block device without requiring a mounted disk:
- Bounds and 64-bit overflow checks (ext4_sb_block_valid and
ext4_inode_block_valid) across 1KiB (s_first_data_block = 1) and 4KiB
(s_first_data_block = 0) geometries, exact end-of-filesystem single
and multi-block spans, 64-bit u64 addition wrap-around, >32-bit block
counts under EXT4_FEATURE_INCOMPAT_64BIT, and high-32-bit masking when
64bit is cleared.
- System-zone lifecycle management (ext4_setup_system_zone and
ext4_release_system_zone), covering pre-setup NULL behavior, RCU
publication and teardown, and idempotent double-release handling.
- Multi-group sparse_super and flex_bg layouts (including groups with
[27 lines not shown]
ext4: add KUnit tests for fs/ext4/balloc.c
Add the ext4_balloc_test KUnit test suite in fs/ext4/balloc-test.c (29
test cases, 43 subtests total) to comprehensively exercise block bitmap
management, group descriptor and overhead calculations, cluster pool
reservation, allocation retry policy, metadata block allocation, and
goal block selection in fs/ext4/balloc.c using an in-memory VFS
superblock, mock block device, and deterministic block pool without
requiring a mounted block device:
- Block-to-group and cluster-offset mapping (ext4_get_group_number and
ext4_get_group_no_and_offset) across 1K and 4K block sizes, standard
shift-based vs. non-standard do_div group geometries, bigalloc
multi-block clusters, s_first_data_block offsets, >32-bit physical
block numbers, and optional NULL output pointers.
- Backup superblock placement (ext4_bg_has_super) across dense
filesystems, sparse_super powers of 3, 5, and 7, and sparse_super2
explicit s_backup_bgs configurations.
- Group descriptor table and base metadata block counts
[44 lines not shown]
ext4: add KUnit tests for fs/ext4/ialloc.c
Add the ext4_ialloc_test KUnit test suite in fs/ext4/ialloc-test.c (28
test cases, 33 subtests total) to comprehensively exercise inode bitmap
management, group selection heuristics, inode allocation, freeing,
orphan lookup, and lazy inode table initialization in fs/ext4/ialloc.c
using an in-memory VFS superblock, mock block device, and deterministic
block pool without requiring a mounted block device:
- Bitmap padding and asynchronous read completion helpers
(ext4_mark_bitmap_end and ext4_end_bitmap_read) across unaligned and
byte-aligned start/end bit boundaries, partial single-byte updates,
no-op guards, BLK_STS_OK completion, and BLK_STS_IOERR / BIO_QUIET
failure handling.
- Inode bitmap validation and loading (ext4_validate_inode_bitmap and
ext4_read_inode_bitmap), covering CRC32C verification, out-of-group
metadata block overlap detection, EXT4_FC_REPLAY and buffer_verified
short-circuits, cache hits vs. synchronous disk reads, lazy
EXT4_BG_INODE_UNINIT bitmap initialization, and fault injection across
[57 lines not shown]
ext4: add KUnit tests for fs/ext4/orphan.c
Add the ext4_orphan_test KUnit test suite in fs/ext4/orphan-test.c (22
test cases, 25 subtests total when CONFIG_QUOTA is enabled; 21 test
cases, 24 subtests otherwise) to comprehensively exercise orphan inode
tracking, orphan file management, and mount-time orphan recovery in
fs/ext4/orphan.c using an in-memory VFS superblock, mock block device,
and deterministic buffer pool without requiring a mounted block device:
- Orphan block geometry and empty-state checks
(ext4_inodes_per_orphan_block across 1K, 2K, 4K, and 64K block sizes,
and ext4_orphan_file_empty across disabled feature, zero-block files,
and multi-block occupancy transitions).
- Superblock linked-list orphan insertion (ext4_orphan_add), covering
no-journal and bad-inode early exits, I_NEW unlocked insertion and
deletion, idempotency when already tracked via i_orphan or
EXT4_STATE_ORPHAN_FILE, LIFO chaining across regular, directory, and
symlink inodes with superblock CRC32C updates, NEXT_ORPHAN boundary
checks at s_inodes_count vs. s_inodes_count + 1, and journal/iloc
[35 lines not shown]
ext4: check multi-block overlap on left traversal in add_system_zone()
When walking system_blks->root to insert [start_blk, start_blk + count),
add_system_zone() takes the left branch whenever start_blk <
entry->start_blk instead of checking that the entire range ends at or
before entry->start_blk (unlike ext4_sb_block_valid(), which checks
start_blk + count - 1 < entry->start_blk).
As a result, a corrupt multi-block metadata range (such as a group's
inode table or a reserved journal inode extent mapped in
ext4_protect_reserved_inode() before sbi->s_system_blks is published)
that starts strictly before an existing system zone and extends into or
across it traverses rb_left instead of returning -EFSCORRUPTED. This
inserts overlapping intervals into system_blks->root and breaks the
disjoint-interval invariant relied upon by ext4_sb_block_valid() (for
example, a lookup on blocks past entry->start_blk + entry->count
branches right and misses the overlapping zone stored in rb_left). A
corrupt 64-bit start_blk whose start_blk + count wraps around u64 can
similarly corrupt the rbtree ordering.
[10 lines not shown]
ext4: enable full feature coverage in fs/ext4/.kunitconfig
Enable CONFIG_EXT4_FS_POSIX_ACL, CONFIG_EXT4_FS_SECURITY,
CONFIG_FS_VERITY, CONFIG_FS_ENCRYPTION, CONFIG_QUOTA, CONFIG_QFMT_V2,
and CONFIG_UNICODE in fs/ext4/.kunitconfig so conditional ext4 source
files and feature-gated code paths (POSIX ACLs, security xattrs,
fs-verity, fscrypt, quota accounting, and UTF-8 casefolding) are
compiled and exercised during KUnit runs.
Fix mock superblock and test setup bugs in existing KUnit suites exposed
by enabling these Kconfig options:
- Provide .get_dquots callbacks in mock super_operations under
CONFIG_QUOTA in block_validity-test.c, extents-test.c,
fast_commit-test.c, inline-test.c, inode-test.c, mballoc-test.c,
namei-test.c, and xattr-test.c so dquot_drop() does not dereference a
NULL callback during ext4_clear_inode().
- Populate sb->s_cop = &ext4_cryptops under CONFIG_FS_ENCRYPTION in
balloc-test.c, extents-test.c, fast_commit-test.c, inline-test.c,
[8 lines not shown]
ext4: expand KUnit tests for fs/ext4/inode.c
Expand the ext4_inode_test KUnit test suite in fs/ext4/inode-test.c from
1 parameterized test (16 timestamp decoding subtests) to 26 test cases
(41 subtests total) to comprehensively exercise fs/ext4/inode.c using an
in-memory VFS superblock, mock block device, and deterministic block pool
without requiring a mounted block device:
- Extra timestamp encoding and 64-bit round-trips across all 16 boundary
vectors, 256-byte inodes with 34-bit seconds + nanoseconds, and
128-byte old inodes storing signed 32-bit seconds with zeroed
nanoseconds.
- Raw inode CRC32C checksum computation and verification
(ext4_inode_csum_set and ext4_inode_csum_verify) across legacy
non-csum filesystems, 128-byte inodes (16-bit lo CRC), 256-byte inodes
with i_extra_isize = 0 vs >= 4 (32-bit CRC), and bit-flip corruptions.
- Inode block count encoding and decoding (ext4_inode_blocks_set and
ext4_inode_blocks) across 32-bit 512B sectors, 48-bit huge_file
sectors, and EXT4_HUGE_FILE_FL filesystem block units.
[58 lines not shown]