Skip to content

Btrfs: truncate space reservation fixes

Chris Mason linux-btrfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Btrfs: account for crcs in delayed ref processingfs/btrfs/delayed-ref.c fs/btrfs/delayed-ref.h fs/btrfs/extent-tree.c +2 more+83 -240 replies
2/5Btrfs: refill block reserves during truncatefs/btrfs/ctree.h fs/btrfs/extent-tree.c fs/btrfs/inode.c+46 -110 replies
3/5Btrfs: reserve space for block groupsfs/btrfs/extent-tree.c fs/btrfs/transaction.c fs/btrfs/transaction.h+11 -30 replies
4/5Btrfs: don't commit the transaction in the async space flushingfs/btrfs/extent-tree.c+8 -60 replies
5/5Btrfs: don't steal from the global reserve if we don't have the spacefs/btrfs/inode.c+44 -20 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/5] Btrfs: truncate space reservation fixes

One of the production workloads here at FB ends up creating and eventually deleting very large files. We were consistently hitting ENOSPC aborts while trying to delete the files because there wasn't enough metadata reserved to cover deleting CRCs or actually updating the block group items on disk.

This patchset addresses these problems by adding crc items into the math for delayed ref processing, and changing the truncate items loop to reserve metadata more often.

It also solves a performance problem where we are constantly committing the transaction in hopes of making enospc progress.