ext4 extent split/convert refactor and kunit tests
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest8 patches 2 repliesApplied
- v38 patches 0 repliesSuperseded
- v28 patches 17 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 7 patches | 16 replies | Superseded |
Changes in v4 from the cover letter
- Rename EX_DATA_* -> EXT_DATA_* in kunit tests
to avoid build warnings on s390 arch due to redefining symbols
- In kunit tests, fix a couple places to use le32_to_cpu() when accessing ex->ee_block
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | ext4: kunit tests for extent splitting and conversionfs/ fs/ fs/ +1 more | +587 | 0 replies | |
| 2/8 | ext4: kunit tests for higher level extent manipulation functionsfs/ fs/ fs/ +1 more | +365 | 0 replies | |
| 3/8 | ext4: Add extent status cache support to kunit testsfs/ fs/ fs/ | +63 | 1 reply | |
| 4/8 | ext4: propagate flags to convert_initialized_extent()fs/ | +4 | 0 replies | |
| 5/8 | ext4: propagate flags to ext4_convert_unwritten_extents_endio()fs/ | +3 | 0 replies | |
| 6/8 | ext4: Refactor zeroout path and handle all casesfs/ | +185 | 0 replies | |
| 7/8 | ext4: Refactor split and convert extentsfs/ | +112 | 0 replies | |
| 8/8 | ext4: Allow zeroout when doing written to unwritten splitfs/ fs/ | +122 | 0 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Zhang Yi | Jan Kara |
|---|---|---|
| 1/8 | R-b | R-b |
| 2/8 | R-b | R-b |
| 3/8 | R-b | R-b |
| 4/8 | R-b | R-b |
| 5/8 | R-b | R-b |
| 6/8 | R-b | R-b |
| 7/8 | R-b | R-b |
| 8/8 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/8] ext4 extent split/convert refactor and kunit tests
@Ted, I've rebased it over
3574c322b1d0 - ext4: use optimized mballoc scanning regardless of inode format
in your dev branch.
Changes in v4:
- Rename EX_DATA_* -> EXT_DATA_* in kunit tests
to avoid build warnings on s390 arch due to redefining symbols
- In kunit tests, fix a couple places to use le32_to_cpu() when accessing ex->ee_block
v3: https://lore.kernel.org/linux-ext4/[email protected]/
Changes in v3:
- Use EX_DATA_LBLK/LEN instead of hard-coding in extents-test.c
- RVBs of Jan and Yi (Thanks!)
- Patch 6/8 - update orig_* after first split
- Minor fixes
Changes in v2:
** KUnit **
- Added new patch 3 to add support for tracking extent status cache in kunit tests
- Kunit tests in patch 2 now test ext4_map_create_blocks() since the final es cachine is done here.
- Also refactored the patch 2 to avoid duplicate code.
** extent handling code **
- Fixed some issues detected by extent status Kunit tests where we were going out of sync when zeroout fallback was taken.
- We no longer handle unwrit to unwrit split as there are no users of that anymore
- Made sure to propogate flags to ext4_find_extent() as well in patch 4,5. Also remove some duplication of flags.
- Cleaned up the code flow of ext4_split_extent() in patch 6.
- Picked up RVBs by Jan.
v1: https://lore.kernel.org/linux-ext4/[email protected]/T/#t
** Testing **
- Run xfstests for 4k, 64k and nodioread_nolock for -g auto with no new regressions.
- All new kunit tests in patch 1-3 that were failing due to issues are now passing with the patches
** Original Cover **
Offlate we've have seen multiple issues and inconsistencies in the our extent splitting and conversion logic causing subtle bugs. Recent patches by Yhang Zi [1] helped address some of the issues however the messy use of EXT4_EXT_DATA_VALID* and EXT4_EXT_MARK_UNWRIT* flags made the implementation confusing and error prone.
This patchset aims to refactor the explent split and convert code paths to make the code simpler and the behavior consistent and easy to understand. It also adds several Kunit tests to stress various permutations of extent splitting and conversion.
I've rebased this over [2] since it seems like it'll go in first.
Another idea I want to try out after this is proactively zeroout before even trying to split, as Jan suggested here [3], but before trying to do that I wanted to refactor and add some tests hence sending these patches out first.
[1] https://lore.kernel.org/linux-ext4/[email protected]/
[2] https://lore.kernel.org/linux-ext4/[email protected]/T/#t
[3] https://lore.kernel.org/linux-ext4/yro4hwpttmy6e2zspvwjfdbpej6qvhlqjvlr5kp3nwffqgcnfd@z6qual55zhfq/
Rest of the details can be found in the commit messages.
Patch 1-2: new kunit tests
Patch 3-4: minor fixes
Patch 5: refactoring zeroout and making sure zeroout handles all
permutations correctly
Patch 6: Refactoring ext4_split_* functions.
Patch 7: Enable zeroout for writ to unwrit case
*****
Ojaswin Mujoo (8):
ext4: kunit tests for extent splitting and conversion
ext4: kunit tests for higher level extent manipulation functions
ext4: Add extent status cache support to kunit tests
ext4: propagate flags to convert_initialized_extent()
ext4: propagate flags to ext4_convert_unwritten_extents_endio()
ext4: Refactor zeroout path and handle all cases
ext4: Refactor split and convert extents
ext4: Allow zeroout when doing written to unwritten split
fs/ext4/ext4.h | 4 + fs/ext4/extents-test.c | 1027 ++++++++++++++++++++++++++++++++++++++ fs/ext4/extents.c | 568 +++++++++++---------- fs/ext4/extents_status.c | 1 + fs/ext4/inode.c | 12 +- 5 files changed, 1357 insertions(+), 255 deletions(-) create mode 100644 fs/ext4/extents-test.c
Signature · 1 line
2.52.0