Skip to content

tests/ext4: Ensure resizes with sparse_super2 are handled correctly

Ojaswin Mujoo fstests linux-ext4 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 6 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2src/ext4_resize.c: Refactor code and ensure accurate errno is returnedsrc/ext4_resize.c+32 -140 replies
2/2ext4: Test to ensure resize with sparse_super2 is handled correctlytests/ext4/056 tests/ext4/056.out+110 -02 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchRitesh Harjani
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] tests/ext4: Ensure resizes with sparse_super2 are handled correctly

As detailed in the patch [1], kernel currently does not support resizes with sparse_super2 enabled. Before the above patch, if we used the EXT4_IOC_RESIZE_FS ioctl directly, wiht sparse_super2 enabled, the kernel used to still try the resize and ultimatley leave the fs in an inconsistent state. This also led to corruption and kernel BUGs.

This patchset adds a test for ext4 to ensure that the kernel handles resizes with sparse_super2 correctly, and returns -EOPNOTSUPP.

Summary:

Patch 1: Fix the src/ext4_resize.c script to return accurate error
codes.
Patch 2: Add the ext4 test for checking resize functionality

Changes since v1 [2]

* In patch 2, don't iterate if the expected errno is returned
* Code cleanup and additional comments for clarity (also see extra note in patch 2)
* No changes in patch 1

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b1489186cc8391e0c1e342f9fbc3eedf6b944c61
[2] https://lore.kernel.org/fstests/[email protected]/

Ojaswin Mujoo (2):
src/ext4_resize.c: Refactor code and ensure accurate errno is returned
ext4: Test to ensure resize with sparse_super2 is handled correctly

 src/ext4_resize.c  |  46 +++++++++++++------
 tests/ext4/056     | 108 +++++++++++++++++++++++++++++++++++++++++++++
 tests/ext4/056.out |   2 +
 3 files changed, 142 insertions(+), 14 deletions(-)
 create mode 100755 tests/ext4/056
 create mode 100644 tests/ext4/056.out
Signature · 1 line
2.27.0