Skip to content

ext4: fix WARNING in ext4_da_update_reserve_space

Baokun Li linux-ext4 lkml 4 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. v4 Latest12 patches 18 repliesApplied
  2. v38 patches 8 repliesSuperseded
  3. v22 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch8 repliesSuperseded

Changes in v4 from the cover letter

using nofail preallocation.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/12ext4: only update i_reserved_data_blocks on successful block allocationfs/ext4/indirect.c fs/ext4/inode.c+8 -100 replies
2/12ext4: add a new helper to check if es must be keptfs/ext4/extents_status.c+21 -131 reply
3/12ext4: factor out __es_alloc_extent() and __es_free_extent()fs/ext4/extents_status.c+19 -111 reply
4/12ext4: use pre-allocated es in __es_insert_extent()fs/ext4/extents_status.c+12 -71 reply
5/12ext4: use pre-allocated es in __es_remove_extent()fs/ext4/extents_status.c+13 -131 reply
6/12ext4: using nofail preallocation in ext4_es_remove_extent()fs/ext4/extents_status.c+11 -21 reply
7/12ext4: using nofail preallocation in ext4_es_insert_delayed_block()fs/ext4/extents_status.c+22 -111 reply
8/12ext4: using nofail preallocation in ext4_es_insert_extent()fs/ext4/extents_status.c+26 -121 reply
9/12ext4: make ext4_es_remove_extent() return voidfs/ext4/extents.c fs/ext4/extents_status.c fs/ext4/extents_status.h +2 more+18 -521 reply
10/12ext4: make ext4_es_insert_delayed_block() return voidfs/ext4/extents_status.c fs/ext4/extents_status.h fs/ext4/inode.c+8 -166 replies
11/12ext4: make ext4_es_insert_extent() return voidfs/ext4/extents.c fs/ext4/extents_status.c fs/ext4/extents_status.h +1 more+18 -281 reply
12/12ext4: make ext4_zeroout_es() return voidfs/ext4/extents.c+5 -71 reply

Reviews trailers per patch

All 12 patches have a Reviewed-by or Acked-by.

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

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

Read the v4 thread

Cover letter [PATCH v4 00/12] ext4: fix WARNING in ext4_da_update_reserve_space

V1->V2:
Modify the patch 1 description and add the Fixes tag. Add the patch 2 as suggested by Jan Kara.
V2->V3:
Remove the redundant judgment of count in Patch [1]. Rename ext4_es_alloc_should_nofail to ext4_es_must_keep. Split Patch [2].
Make some functions return void to simplify the code.
V3->V4:
using nofail preallocation.

This patch set consists of three parts:
1. Patch [1] fix WARNING in ext4_da_update_reserve_space.
2. Patch [2]-[8] fix extent tree inconsistencies that may be caused by memory allocation failures.
3. Patch [9]-[12] is cleanup.

Baokun Li (12):
ext4: only update i_reserved_data_blocks on successful block
allocation
ext4: add a new helper to check if es must be kept
ext4: factor out __es_alloc_extent() and __es_free_extent()
ext4: use pre-allocated es in __es_insert_extent()
ext4: use pre-allocated es in __es_remove_extent()
ext4: using nofail preallocation in ext4_es_remove_extent()
ext4: using nofail preallocation in ext4_es_insert_delayed_block()
ext4: using nofail preallocation in ext4_es_insert_extent()
ext4: make ext4_es_remove_extent() return void
ext4: make ext4_es_insert_delayed_block() return void
ext4: make ext4_es_insert_extent() return void
ext4: make ext4_zeroout_es() return void

 fs/ext4/extents.c        |  49 +++------
 fs/ext4/extents_status.c | 207 ++++++++++++++++++++++++---------------
 fs/ext4/extents_status.h |  14 +--
 fs/ext4/indirect.c       |   8 ++
 fs/ext4/inline.c         |  12 +--
 fs/ext4/inode.c          |  49 ++-------
 6 files changed, 169 insertions(+), 170 deletions(-)
Signature · 1 line
2.31.1