Skip to content

btrfs: improve error reporting for log tree replay

[email protected] linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10btrfs: error on missing block group when unaccounting log tree extent buffersfs/btrfs/tree-log.c+7 -120 replies
2/10btrfs: abort transaction on specific error places when walking log treefs/btrfs/tree-log.c+28 -50 replies
3/10btrfs: abort transaction in the process_one_buffer() log tree walk callbackfs/btrfs/tree-log.c+22 -40 replies
4/10btrfs: use local variable for the transaction handle in replay_one_buffer()fs/btrfs/tree-log.c+11 -180 replies
5/10btrfs: return real error from read_alloc_one_name() in drop_one_dir_item()fs/btrfs/tree-log.c+1 -10 replies
6/10btrfs: abort transaction where errors happen during log tree replayfs/btrfs/tree-log.c+186 -510 replies
7/10btrfs: exit early when replaying hole file extent item from a log treefs/btrfs/tree-log.c+126 -1350 replies
8/10btrfs: process inline extent earlier in replay_one_extent()fs/btrfs/tree-log.c+163 -1640 replies
9/10btrfs: use local key variable to pass arguments in replay_one_extent()fs/btrfs/tree-log.c+1 -30 replies
10/10btrfs: collapse unaccount_log_buffer() into clean_log_buffer()fs/btrfs/tree-log.c+21 -300 replies

Reviews trailers per patch

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

PatchQu Wenruo
SeriesR-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

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

Read the v1 thread

Cover letter [PATCH 00/10] btrfs: improve error reporting for log tree replay

From: Filipe Manana <[email protected]>

Most errors that happen during log replay or destroying a log tree are hard to figure out where they come from, since typically deep in the call chain of log tree walking we return errors and propagate them up to the caller of the main log tree walk function, which then aborts the transaction or turns the filesystem into error state (btrfs_handle_fs_error()). This means any stack trace and message provided by a transaction abort or turning fs into error state, doesn't provide information where exactly in the deep call chain the error comes from.

These changes mostly make transacton aborts and btrfs_handle_fs_error() calls where errors happen, so that we get much more useful information which sometimes is enough to understand issues. The rest are just some cleanups.

Filipe Manana (10):
btrfs: error on missing block group when unaccounting log tree extent buffers
btrfs: abort transaction on specific error places when walking log tree
btrfs: abort transaction in the process_one_buffer() log tree walk callback
btrfs: use local variable for the transaction handle in replay_one_buffer()
btrfs: return real error from read_alloc_one_name() in drop_one_dir_item()
btrfs: abort transaction where errors happen during log tree replay
btrfs: exit early when replaying hole file extent item from a log tree
btrfs: process inline extent earlier in replay_one_extent()
btrfs: use local key variable to pass arguments in replay_one_extent()
btrfs: collapse unaccount_log_buffer() into clean_log_buffer()

 fs/btrfs/tree-log.c | 659 +++++++++++++++++++++++++++-----------------
 1 file changed, 401 insertions(+), 258 deletions(-)
Signature · 1 line
2.47.2