Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: fdmanana@kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 00/10] btrfs: improve error reporting for log tree replay
Date: Tue, 22 Jul 2025 09:45:52 +0930	[thread overview]
Message-ID: <63f83bf0-e5d0-44a6-8a7b-0ab32b2c64ee@suse.com> (raw)
In-Reply-To: <cover.1753117707.git.fdmanana@suse.com>



在 2025/7/22 02:46, fdmanana@kernel.org 写道:
> From: Filipe Manana <fdmanana@suse.com>
> 
> 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.

Reviewed-by: Qu Wenruo <wqu@suse.com>

Although I believe we may further enhance the output by dumping the log 
tree when replay_one_buffer() function failed.

Especially considering we don't have a simple way to dump the log tree 
for a subvolume (always needs to go through the log tree root, then into 
the log tree of a subvolume).

Thanks,
Qu


> 
> 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(-)
> 



  parent reply	other threads:[~2025-07-22  0:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21 17:16 [PATCH 00/10] btrfs: improve error reporting for log tree replay fdmanana
2025-07-21 17:16 ` [PATCH 01/10] btrfs: error on missing block group when unaccounting log tree extent buffers fdmanana
2025-07-21 17:16 ` [PATCH 02/10] btrfs: abort transaction on specific error places when walking log tree fdmanana
2025-07-21 17:16 ` [PATCH 03/10] btrfs: abort transaction in the process_one_buffer() log tree walk callback fdmanana
2025-07-21 17:16 ` [PATCH 04/10] btrfs: use local variable for the transaction handle in replay_one_buffer() fdmanana
2025-07-21 17:16 ` [PATCH 05/10] btrfs: return real error from read_alloc_one_name() in drop_one_dir_item() fdmanana
2025-07-21 17:16 ` [PATCH 06/10] btrfs: abort transaction where errors happen during log tree replay fdmanana
2025-07-21 17:16 ` [PATCH 07/10] btrfs: exit early when replaying hole file extent item from a log tree fdmanana
2025-07-21 17:16 ` [PATCH 08/10] btrfs: process inline extent earlier in replay_one_extent() fdmanana
2025-07-21 17:16 ` [PATCH 09/10] btrfs: use local key variable to pass arguments " fdmanana
2025-07-21 17:16 ` [PATCH 10/10] btrfs: collapse unaccount_log_buffer() into clean_log_buffer() fdmanana
2025-07-22  0:15 ` Qu Wenruo [this message]
2025-07-22 10:04   ` [PATCH 00/10] btrfs: improve error reporting for log tree replay Filipe Manana
2025-07-22 10:14     ` Qu Wenruo
     [not found] ` <20250721202418.GA2071341@zen.localdomain>
2025-07-22  9:55   ` Filipe Manana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63f83bf0-e5d0-44a6-8a7b-0ab32b2c64ee@suse.com \
    --to=wqu@suse.com \
    --cc=fdmanana@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox