Skip to content

ext4: fast_commit fixes, stricter block checking & cleanups

Ritesh Harjani linux-ext4 linux-fsdevel 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 1 replyApplied
  2. v19 patches 9 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/9ext4: Correct cluster len and clusters changed accounting in ext4_mb_mark_bbfs/ext4/mballoc.c+12 -70 replies
2/9ext4: Fixes ext4_mb_mark_bb() with flex_bg with fast_commitfs/ext4/mballoc.c+76 -550 replies
3/9ext4: Refactor ext4_free_blocks() to pull out ext4_mb_clear_bb()fs/ext4/mballoc.c+102 -780 replies
4/9ext4: Use in_range() for range checking in ext4_fc_replay_check_excludedfs/ext4/fast_commit.c+2 -20 replies
5/9ext4: Rename ext4_set_bits to mb_set_bitsfs/ext4/ext4.h fs/ext4/mballoc.c fs/ext4/resize.c+10 -100 replies
6/9ext4: No need to test for block bitmap bits in ext4_mb_mark_bb()fs/ext4/mballoc.c+1 -10 replies
7/9ext4: Add ext4_sb_block_valid() refactored out of ext4_inode_block_valid()fs/ext4/block_validity.c fs/ext4/ext4.h+20 -90 replies
8/9ext4: Add strict range checks while freeing blocksfs/ext4/mballoc.c+3 -130 replies
9/9ext4: Add extra check in ext4_mb_mark_bb() to prevent against possible corruptionfs/ext4/mballoc.c+8 -00 replies

Reviews trailers per patch

8 of 9 patches have a Reviewed-by or Acked-by.

PatchJan Kara
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9
8/9R-b
9/9R-b

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

Read the v2 thread

Cover letter [PATCHv2 0/9] ext4: fast_commit fixes, stricter block checking & cleanups

Hello,

Please find the v2 of this patch series which addresses the review comments from Jan on PATCH-2 & PATCH-7. No changes other than that.

Summary
========
This patch series aimes at fixing some of the issues identified in fast_commit with flex_bg. This also adds some stricter checking of blocks to be freed in ext4_mb_clear_bb(), ext4_group_add_blocks() & ext4_mb_mark_bb()

Testing
=========
I have run xfstests with -g log,metadata,auto group with 4k & 4k_fc configs. I have not found any regression due to these patches alone.

But I have found few issues like generic/047 occasionally failing even w/o this patch series. I do have some fixes for those too in my tree. I will send those fixes later after figuring out few more things around couple other failures.

References
===========
[v1]: https://lore.kernel.org/all/[email protected]/
[RFC]: https://lore.kernel.org/all/a9770b46522c03989bdd96f63f7d0bfb2cf499ab.1643642105.git.riteshh@linux.ibm.com/

Ritesh Harjani (9):
ext4: Correct cluster len and clusters changed accounting in ext4_mb_mark_bb
ext4: Fixes ext4_mb_mark_bb() with flex_bg with fast_commit
ext4: Refactor ext4_free_blocks() to pull out ext4_mb_clear_bb()
ext4: Use in_range() for range checking in ext4_fc_replay_check_excluded
ext4: Rename ext4_set_bits to mb_set_bits
ext4: No need to test for block bitmap bits in ext4_mb_mark_bb()
ext4: Add ext4_sb_block_valid() refactored out of ext4_inode_block_valid()
ext4: Add strict range checks while freeing blocks
ext4: Add extra check in ext4_mb_mark_bb() to prevent against possible corruption

 fs/ext4/block_validity.c |  26 +--
 fs/ext4/ext4.h           |   5 +-
 fs/ext4/fast_commit.c    |   4 +-
 fs/ext4/mballoc.c        | 342 ++++++++++++++++++++++-----------------
 fs/ext4/resize.c         |   4 +-
 5 files changed, 220 insertions(+), 161 deletions(-)

--
2.31.1