Skip to content

ext4: lots of misc bug fixes

Theodore Ts'o linux-ext4 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest23 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23ext4: only update s_mount_opts when EXT4_TUNE_FL_MOUNT_OPTS is setfs/ext4/ioctl-test.c fs/ext4/ioctl.c+44 -20 replies
2/23ext4: return -EFSBADCRC when skipping a corrupt backup superblockfs/ext4/ioctl-test.c fs/ext4/ioctl.c+55 -20 replies
3/23ext4: don't allow enabling casefold via EXT4_IOC_SET_TUNE_SB_PARAMfs/ext4/ioctl-test.c fs/ext4/ioctl.c+28 -540 replies
4/23ext4: persist the htree hash seed when enabling dir_index onlinefs/ext4/ioctl-test.c fs/ext4/ioctl.c+78 -50 replies
5/23ext4: enforce feature prerequisites when tuning a mounted fsfs/ext4/ioctl-test.c fs/ext4/ioctl.c+137 -00 replies
6/23ext4: handle s_lastcheck_hi in the get/set tune superblock ioctlsfs/ext4/ioctl-test.c fs/ext4/ioctl.c+72 -20 replies
7/23ext4: pass missing ioctls through ext4_compat_ioctlfs/ext4/ioctl-test.c fs/ext4/ioctl.c+24 -00 replies
8/23ext4: fix inverted err_report_sec check in ext4_update_super()fs/ext4/super-test.c fs/ext4/super.c+16 -20 replies
9/23ext4: fix err_report_sec_store() timer and value handlingfs/ext4/super.c fs/ext4/sysfs-test.c fs/ext4/sysfs.c+73 -100 replies
10/23ext4: fix inode table accounting in count_overhead()fs/ext4/super-test.c fs/ext4/super.c+38 -20 replies
11/23ext4: handle flex groups straddling s_first_meta_bg in online resizefs/ext4/resize-test.c fs/ext4/resize.c+122 -130 replies
12/23ext4: reject EXT4_IOC_GROUP_ADD inputs larger than a block groupfs/ext4/resize-test.c fs/ext4/resize.c+14 -10 replies
13/23ext4: propagate ext4_alloc_group_tables() errors from ext4_resize_fs()fs/ext4/resize-test.c fs/ext4/resize.c+26 -10 replies
14/23ext4: reject online shrink before probing the device sizefs/ext4/resize-test.c fs/ext4/resize.c+11 -00 replies
15/23ext4: cap migrated extents at EXT_INIT_MAX_LENfs/ext4/migrate-test.c fs/ext4/migrate.c+95 -20 replies
16/23ext4: don't treat a handle restart as an error in finish_range()fs/ext4/extents.c fs/ext4/migrate-test.c fs/ext4/migrate.c+75 -00 replies
17/23ext4: don't clobber the migration result in ext4_ext_migrate()fs/ext4/migrate-test.c fs/ext4/migrate.c+56 -60 replies
18/23ext4: fix EOF clamping of the range in mext_check_adjust_range()fs/ext4/move_extent-test.c fs/ext4/move_extent.c+23 -20 replies
19/23ext4: bound the MMP update and check intervalsfs/ext4/ext4.h fs/ext4/mmp-test.c fs/ext4/mmp.c+205 -40 replies
20/23ext4: fix MMP claim of a cleanly unmounted filesystemfs/ext4/mmp-test.c fs/ext4/mmp.c+78 -100 replies
21/23ext4: fix device comparison overflow in ext4_getfsmap_dev_compare()fs/ext4/fsmap-test.c fs/ext4/fsmap.c+57 -10 replies
22/23ext4: don't allocate over indirect branches that failed to loadfs/ext4/indirect-test.c fs/ext4/indirect.c+102 -70 replies
23/23ext4: don't stop EXT4_IOC_GET_ES_CACHE at uncached rangesfs/ext4/extents-test.c fs/ext4/extents.c fs/ext4/extents_status-test.c +1 more+76 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/23] ext4: lots of misc bug fixes

While an LLM was creating a whole batch of KUnit tests for ext4[1], the AI found a large number of potential bugs. After validating the list of bugs using a smarter LLM, the fixes for the valid bugs are in this patch set. A summary of all the bugs, how they are fixed, and their criticality level --- e.g., "Critical (data loss)", "High (metadata corruption)", "Low (32-bit compat)", etc. --- can be found in report-bugfixes.md[2].

[1] https://lore.kernel.org/r/[email protected]
[2] https://drive.google.com/file/d/1pnTKAVf9pAoCK27619uP4_3_hpE04SkR/view

Some of these bug fixes may be duplicative of the backlog of AI slop patch backlog (sorry, submitters; I'll be processing them now that the merge window is closed).

Of course, these patches are *also* potentially AI slop, so while I've given them a very light review, we'll have to see what Sashiko has to say, and they need a more in-depth review before they get landed.

Theodore Ts'o (23):
ext4: only update s_mount_opts when EXT4_TUNE_FL_MOUNT_OPTS is set
ext4: return -EFSBADCRC when skipping a corrupt backup superblock
ext4: don't allow enabling casefold via EXT4_IOC_SET_TUNE_SB_PARAM
ext4: persist the htree hash seed when enabling dir_index online
ext4: enforce feature prerequisites when tuning a mounted fs
ext4: handle s_lastcheck_hi in the get/set tune superblock ioctls
ext4: pass missing ioctls through ext4_compat_ioctl
ext4: fix inverted err_report_sec check in ext4_update_super()
ext4: fix err_report_sec_store() timer and value handling
ext4: fix inode table accounting in count_overhead()
ext4: handle flex groups straddling s_first_meta_bg in online resize
ext4: reject EXT4_IOC_GROUP_ADD inputs larger than a block group
ext4: propagate ext4_alloc_group_tables() errors from ext4_resize_fs()
ext4: reject online shrink before probing the device size
ext4: cap migrated extents at EXT_INIT_MAX_LEN
ext4: don't treat a handle restart as an error in finish_range()
ext4: don't clobber the migration result in ext4_ext_migrate()
ext4: fix EOF clamping of the range in mext_check_adjust_range()
ext4: bound the MMP update and check intervals
ext4: fix MMP claim of a cleanly unmounted filesystem
ext4: fix device comparison overflow in ext4_getfsmap_dev_compare()
ext4: don't allocate over indirect branches that failed to load
ext4: don't stop EXT4_IOC_GET_ES_CACHE at uncached ranges

 fs/ext4/ext4.h                |   8 +
 fs/ext4/extents-test.c        |  30 +++
 fs/ext4/extents.c             |  13 +-
 fs/ext4/extents_status-test.c |  17 +-
 fs/ext4/extents_status.c      |  23 +++
 fs/ext4/fsmap-test.c          |  56 ++++++
 fs/ext4/fsmap.c               |   2 +-
 fs/ext4/indirect-test.c       |  90 ++++++++-
 fs/ext4/indirect.c            |  19 +-
 fs/ext4/ioctl-test.c          | 356 ++++++++++++++++++++++++++++++++--
 fs/ext4/ioctl.c               | 145 +++++++++-----
 fs/ext4/migrate-test.c        | 210 +++++++++++++++++++-
 fs/ext4/migrate.c             |  20 +-
 fs/ext4/mmp-test.c            | 222 ++++++++++++++++++++-
 fs/ext4/mmp.c                 |  67 +++++--
 fs/ext4/move_extent-test.c    |  21 ++
 fs/ext4/move_extent.c         |   4 +-
 fs/ext4/resize-test.c         | 118 +++++++++++
 fs/ext4/resize.c              |  70 +++++--
 fs/ext4/super-test.c          |  37 ++++
 fs/ext4/super.c               |  28 ++-
 fs/ext4/sysfs-test.c          |  55 ++++++
 fs/ext4/sysfs.c               |  21 +-
 23 files changed, 1504 insertions(+), 128 deletions(-)
Signature · 1 line
2.56.0.542.g3ef89b7020-goog