Skip to content

btrfs: some fixes and updates around handling errors for tree mod log operations

[email protected] linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 8 repliesIn review
  2. v113 patches 18 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13btrfs: add missing error handling when logging operation while COWing extent bufferfs/btrfs/ctree.c+8 -20 replies
2/13btrfs: fix extent buffer leak after tree mod log failure at split_node()fs/btrfs/ctree.c+2 -00 replies
3/13btrfs: avoid tree mod log ENOMEM failures when we don't need to logfs/btrfs/tree-mod-log.c+114 -340 replies
4/13btrfs: do not BUG_ON() on tree mod log failure at __btrfs_cow_block()fs/btrfs/ctree.c+7 -20 replies
5/13btrfs: do not BUG_ON() on tree mod log failure at balance_level()fs/btrfs/ctree.c+14 -30 replies
6/13btrfs: rename enospc label to out at balance_level()fs/btrfs/ctree.c+12 -120 replies
7/13btrfs: avoid unnecessarily setting the fs to RO and error state at balance_level()fs/btrfs/ctree.c+0 -13 replies
8/13btrfs: abort transaction at balance_level() when left child is missingfs/btrfs/ctree.c+7 -32 replies
9/13btrfs: abort transaction at update_ref_for_cow() when ref count is zerofs/btrfs/ctree.c+7 -31 reply
10/13btrfs: do not BUG_ON() on tree mod log failures at push_nodes_for_insert()fs/btrfs/ctree.c+12 -20 replies
11/13btrfs: do not BUG_ON() on tree mod log failure at insert_new_root()fs/btrfs/ctree.c+6 -10 replies
12/13btrfs: do not BUG_ON() on tree mod log failures at insert_ptr()fs/btrfs/ctree.c+52 -190 replies
13/13btrfs: do not BUG_ON() on tree mod log failures at btrfs_del_ptr()fs/btrfs/ctree.c fs/btrfs/ctree.h+41 -150 replies

Reviews trailers per patch

10 of 13 patches have a Reviewed-by or Acked-by.

PatchQu WenruoAnand Jain
1/13R-b
2/13R-b
3/13
4/13R-b
5/13R-b
6/13R-b R-b
7/13R-b
8/13R-b R-b
9/13R-b
10/13R-b
11/13R-b
12/13
13/13

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

Read the v2 thread

Cover letter [PATCH v2 00/13] btrfs: some fixes and updates around handling errors for tree mod log operations

From: Filipe Manana <[email protected]>

This mostly helps avoid some unnecessary enomem failures when logging tree mod log operations and replace some BUG_ON()'s when dealing with such failures. There's also 2 bug fixes (the first two patches) and some cleanups. More details on the changelogs.

V2: Add explicit error messages in patches 8/13 and 9/13.
Add missing unlock and ref count drop of 'right' extent buffer to patch 12/13. Add missing extent buffer ref count drops for right and mid extent buffers in error paths of balance_level() to patch 13/13.
Fix subject of patch 2/13 (removed duplicated word).
Added Reviewed-by tags where appropriate.

Filipe Manana (13):
btrfs: add missing error handling when logging operation while COWing extent buffer
btrfs: fix extent buffer leak after tree mod log failure at split_node()
btrfs: avoid tree mod log ENOMEM failures when we don't need to log
btrfs: do not BUG_ON() on tree mod log failure at __btrfs_cow_block()
btrfs: do not BUG_ON() on tree mod log failure at balance_level()
btrfs: rename enospc label to out at balance_level()
btrfs: avoid unnecessarily setting the fs to RO and error state at balance_level()
btrfs: abort transaction at balance_level() when left child is missing
btrfs: abort transaction at update_ref_for_cow() when ref count is zero
btrfs: do not BUG_ON() on tree mod log failures at push_nodes_for_insert()
btrfs: do not BUG_ON() on tree mod log failure at insert_new_root()
btrfs: do not BUG_ON() on tree mod log failures at insert_ptr()
btrfs: do not BUG_ON() on tree mod log failures at btrfs_del_ptr()

 fs/btrfs/ctree.c        | 221 +++++++++++++++++++++++++++++-----------
 fs/btrfs/ctree.h        |   4 +-
 fs/btrfs/tree-mod-log.c | 148 ++++++++++++++++++++-------
 3 files changed, 279 insertions(+), 94 deletions(-)
Signature · 1 line
2.34.1