Skip to content

RFC delayed allocation ENOSPC handling

Mingming Cao linux-ext4 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6delalloc ENOSPC: Add per-inode counters to store reserved blocksfs/ext4/ext4_i.h fs/ext4/super.c+6 -00 replies
2/6delalloc ENOSPC: estimate metadata blocks needed to reservefs/ext4/ext4_extents.h fs/ext4/extents.c+31 -00 replies
3/6delalloc ENOSPC: reserve blocksfs/ext4/inode.c+66 -33 replies
4/6delalloc ENOSPC: avoid free blocks double bookingfs/ext4/dir.c fs/ext4/ext4.h fs/ext4/ext4_i.h +4 more+41 -113 replies
5/6delalloc ENOSPC: release reservation for unlink/truncatefs/ext4/inode.c+21 -70 replies
6/6delalloc ENOSPC: improve percpu counter accounting accuratefs/ext4/balloc.c include/linux/percpu_counter.h lib/percpu_counter.c+16 -53 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC][PATCH 0/6] delayed allocation ENOSPC handling

The following series patches does block reservation for delayed allocation, to avoid ENOSPC later at page flush time.

Blocks(data and metadata) are reserved at da_write_begin() time, the freeblocks counter is updated by then, and the number of reserved blocks is store in per inode counter.

At the writepage time, the unused reserved meta blocks are returned back. At unlink/truncate time, reserved blocks are properly released.