Skip to content

btrfs: log replay bug fix, cleanups and error reporting changes

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest33 patches 4 repliesIn review
  2. v133 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/33btrfs: fix invalid extref key setup when replaying dentryfs/btrfs/tree-log.c+1 -10 replies
2/33btrfs: use booleans in walk control structure for log replayfs/btrfs/tree-log.c+14 -90 replies
3/33btrfs: rename replay_dest member of struct walk_control to rootfs/btrfs/tree-log.c+17 -150 replies
4/33btrfs: rename root to log in walk_down_log_tree() and walk_up_log_tree()fs/btrfs/tree-log.c+5 -60 replies
5/33btrfs: add and use a log root field to struct walk_controlfs/btrfs/tree-log.c+35 -270 replies
6/33btrfs: deduplicate log root free in error paths from btrfs_recover_log_trees()fs/btrfs/tree-log.c+1 -40 replies
7/33btrfs: stop passing transaction parameter to log tree walk functionsfs/btrfs/tree-log.c+14 -140 replies
8/33btrfs: stop setting log_root_tree->log_root to NULL in btrfs_recover_log_trees()fs/btrfs/tree-log.c+0 -10 replies
9/33btrfs: always drop log root tree reference in btrfs_replay_log()fs/btrfs/disk-io.c fs/btrfs/tree-log.c+1 -20 replies
10/33btrfs: pass walk_control structure to replay_xattr_deletes()fs/btrfs/tree-log.c+7 -60 replies
11/33btrfs: move up the definition of struct walk_controlfs/btrfs/tree-log.c+51 -520 replies
12/33btrfs: pass walk_control structure to replay_dir_deletes()fs/btrfs/tree-log.c+14 -140 replies
13/33btrfs: pass walk_control structure to check_item_in_log()fs/btrfs/tree-log.c+8 -80 replies
14/33btrfs: pass walk_control structure to replay_one_extent()fs/btrfs/tree-log.c+4 -30 replies
15/33btrfs: pass walk_control structure to add_inode_ref() and helpersfs/btrfs/tree-log.c+23 -240 replies
16/33btrfs: pass walk_control structure to replay_one_dir_item() and replay_one_name()fs/btrfs/tree-log.c+8 -80 replies
17/33btrfs: pass walk_control structure to drop_one_dir_item() and helpersfs/btrfs/tree-log.c+23 -210 replies
18/33btrfs: pass walk_control structure to overwrite_item()fs/btrfs/tree-log.c+7 -60 replies
19/33btrfs: use level argument in log tree walk callback process_one_buffer()fs/btrfs/tree-log.c+1 -20 replies
20/33btrfs: use level argument in log tree walk callback replay_one_buffer()fs/btrfs/tree-log.c+3 -50 replies
21/33btrfs: use the inode item boolean everywhere in overwrite_item()fs/btrfs/tree-log.c+5 -50 replies
22/33btrfs: add current log leaf, key and slot to struct walk_controlfs/btrfs/tree-log.c+126 -1291 reply
23/33btrfs: avoid unnecessary path allocation at fixup_inode_link_count()fs/btrfs/tree-log.c+3 -70 replies
24/33btrfs: avoid path allocations when dropping extents during log replayfs/btrfs/tree-log.c+2 -00 replies
25/33btrfs: avoid unnecessary path allocation when replaying a dir itemfs/btrfs/tree-log.c+1 -90 replies
26/33btrfs: remove redundant path release when processing dentry during log replayfs/btrfs/tree-log.c+0 -10 replies
27/33btrfs: remove redundant path release when overwriting item during log replayfs/btrfs/tree-log.c+0 -10 replies
28/33btrfs: add path for subvolume tree changes to struct walk_controlfs/btrfs/tree-log.c+156 -1670 replies
29/33btrfs: stop passing inode object IDs to __add_inode_ref() in log replayfs/btrfs/tree-log.c+15 -210 replies
30/33btrfs: remove pointless inode lookup when processing extrefs during log replayfs/btrfs/tree-log.c+1 -130 replies
31/33btrfs: abort transaction if we fail to find dir item during log replayfs/btrfs/tree-log.c+3 -10 replies
32/33btrfs: abort transaction if we fail to update inode in log replay dir fixupfs/btrfs/tree-log.c+2 -00 replies
33/33btrfs: dump detailed info and specific messages on log replay failuresfs/btrfs/fs.h fs/btrfs/tree-log.c+348 -862 replies

Reviews trailers per patch

None of the 33 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDavid Sterba
SeriesR-b
1/33
2/33
3/33
4/33
5/33
6/33
7/33
8/33
9/33
10/33
11/33
12/33
13/33
14/33
15/33
16/33
17/33
18/33
19/33
20/33
21/33
22/33
23/33
24/33
25/33
26/33
27/33
28/33
29/33
30/33
31/33
32/33
33/33

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/33] btrfs: log replay bug fix, cleanups and error reporting changes

From: Filipe Manana <[email protected]>

The following are a bug fix for an extref key offset computation, several cleanups to eliminate duplicated or not needed code, memory allocations and preparation work for the final change which is to make log replay failures dump contextual information useful to help debug failures during log replay. Details in the change logs.

V2: Update subject of patch 18/33 which was a duplicate of another one
likely due to copy paste. Update patch 33/33 to avoid use-after-free on a name if we had an error during replay of xattr deletes.

Filipe Manana (33):
btrfs: fix invalid extref key setup when replaying dentry
btrfs: use booleans in walk control structure for log replay
btrfs: rename replay_dest member of struct walk_control to root
btrfs: rename root to log in walk_down_log_tree() and walk_up_log_tree()
btrfs: add and use a log root field to struct walk_control
btrfs: deduplicate log root free in error paths from btrfs_recover_log_trees()
btrfs: stop passing transaction parameter to log tree walk functions
btrfs: stop setting log_root_tree->log_root to NULL in btrfs_recover_log_trees()
btrfs: always drop log root tree reference in btrfs_replay_log()
btrfs: pass walk_control structure to replay_xattr_deletes()
btrfs: move up the definition of struct walk_control
btrfs: pass walk_control structure to replay_dir_deletes()
btrfs: pass walk_control structure to check_item_in_log()
btrfs: pass walk_control structure to replay_one_extent()
btrfs: pass walk_control structure to add_inode_ref() and helpers
btrfs: pass walk_control structure to replay_one_dir_item() and replay_one_name()
btrfs: pass walk_control structure to drop_one_dir_item() and helpers
btrfs: pass walk_control structure to overwrite_item()
btrfs: use level argument in log tree walk callback process_one_buffer()
btrfs: use level argument in log tree walk callback replay_one_buffer()
btrfs: use the inode item boolean everywhere in overwrite_item()
btrfs: add current log leaf, key and slot to struct walk_control
btrfs: avoid unnecessary path allocation at fixup_inode_link_count()
btrfs: avoid path allocations when dropping extents during log replay
btrfs: avoid unnecessary path allocation when replaying a dir item
btrfs: remove redundant path release when processing dentry during log replay
btrfs: remove redundant path release when overwriting item during log replay
btrfs: add path for subvolume tree changes to struct walk_control
btrfs: stop passing inode object IDs to __add_inode_ref() in log replay
btrfs: remove pointless inode lookup when processing extrefs during log replay
btrfs: abort transaction if we fail to find dir item during log replay
btrfs: abort transaction if we fail to update inode in log replay dir fixup
btrfs: dump detailed info and specific messages on log replay failures

 fs/btrfs/disk-io.c  |    2 +-
 fs/btrfs/fs.h       |    2 +
 fs/btrfs/tree-log.c | 1299 +++++++++++++++++++++++++------------------
 3 files changed, 767 insertions(+), 536 deletions(-)
Signature · 1 line
2.47.2