Skip to content

ext4: rework bigalloc reserved cluster accounting

Eric Whitney linux-ext4 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest6 patches 1 replyIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ext4: generalize extents status tree search functionsfs/ext4/ext4.h fs/ext4/extents.c fs/ext4/extents_status.c +3 more+165 -740 replies
2/6ext4: add new pending reservation mechanismfs/ext4/ext4.h fs/ext4/extents_status.c fs/ext4/extents_status.h +1 more+249 -00 replies
3/6ext4: fix reserved cluster accounting at delayed write timefs/ext4/ext4.h fs/ext4/extents.c fs/ext4/extents_status.c +3 more+241 -180 replies
4/6ext4: reduce reserved cluster count by number of allocated clustersfs/ext4/extents.c fs/ext4/extents_status.c fs/ext4/extents_status.h+207 -1600 replies
5/6ext4: adjust reserved cluster count when removing extentsfs/ext4/ext4.h fs/ext4/ext4_extents.h fs/ext4/extents.c +2 more+238 -1340 replies
6/6ext4: fix reserved cluster accounting at page invalidation timefs/ext4/ext4.h fs/ext4/extents_status.c fs/ext4/inode.c+95 -190 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/6] ext4: rework bigalloc reserved cluster accounting

Ext4 can make gross overestimates of the number of reserved clusters required to handle bigalloc write requests under delayed allocation, resulting in premature ENOSPC and quota limit failures.

These patches fix the implementation of reserved cluster accounting for bigalloc file systems configured to use delayed allocation, and fix the specific bugs described in bugzilla #151491.

v2: Moved functionality that revises pending reservations after
block/cluster allocation into ext4_es_insert_extent under i_es_lock to maintain pending reservation and extents status tree consistency. Renamed ext4_es_is_delunwrit to more appropriate ext4_es_is_delonly. Fixed unwritten extent handling bugs resulting in generic/112 failures.

v3: Moved definition for new function ext4_es_is_delonly from patch
4 to patch 3 to avoid a compilation error in the event of bisection, as detected/reported by kbuild testing.

Eric Whitney (6):
ext4: generalize extents status tree search functions
ext4: add new pending reservation mechanism
ext4: fix reserved cluster accounting at delayed write time
ext4: reduce reserved cluster count by number of allocated clusters
ext4: adjust reserved cluster count when removing extents
ext4: fix reserved cluster accounting at page invalidation time

 fs/ext4/ext4.h              |  10 +-
 fs/ext4/ext4_extents.h      |  13 +
 fs/ext4/extents.c           | 595 +++++++++++++++++++---------------------
 fs/ext4/extents_status.c    | 654 ++++++++++++++++++++++++++++++++++++++++++--
 fs/ext4/extents_status.h    |  80 +++++-
 fs/ext4/inode.c             | 113 +++++---
 fs/ext4/mballoc.c           |  14 +-
 fs/ext4/super.c             |   8 +
 include/trace/events/ext4.h |  99 +++++--
 9 files changed, 1188 insertions(+), 398 deletions(-)
Signature · 1 line
2.11.0