public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 00/33] btrfs: log replay bug fix, cleanups and error reporting changes
Date: Mon,  8 Sep 2025 10:52:54 +0100	[thread overview]
Message-ID: <cover.1757271913.git.fdmanana@suse.com> (raw)
In-Reply-To: <cover.1757075118.git.fdmanana@suse.com>

From: Filipe Manana <fdmanana@suse.com>

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

-- 
2.47.2


  parent reply	other threads:[~2025-09-08  9:53 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 16:09 [PATCH 00/33] btrfs: log replay bug fix, cleanups and error reporting changes fdmanana
2025-09-05 16:09 ` [PATCH 01/33] btrfs: fix invalid extref key setup when replaying dentry fdmanana
2025-09-05 16:09 ` [PATCH 02/33] btrfs: use booleans in walk control structure for log replay fdmanana
2025-09-05 16:09 ` [PATCH 03/33] btrfs: rename replay_dest member of struct walk_control to root fdmanana
2025-09-05 16:09 ` [PATCH 04/33] btrfs: rename root to log in walk_down_log_tree() and walk_up_log_tree() fdmanana
2025-09-05 16:09 ` [PATCH 05/33] btrfs: add and use a log root field to struct walk_control fdmanana
2025-09-05 16:09 ` [PATCH 06/33] btrfs: deduplicate log root free in error paths from btrfs_recover_log_trees() fdmanana
2025-09-05 16:09 ` [PATCH 07/33] btrfs: stop passing transaction parameter to log tree walk functions fdmanana
2025-09-05 16:09 ` [PATCH 08/33] btrfs: stop setting log_root_tree->log_root to NULL in btrfs_recover_log_trees() fdmanana
2025-09-05 16:09 ` [PATCH 09/33] btrfs: always drop log root tree reference in btrfs_replay_log() fdmanana
2025-09-05 16:09 ` [PATCH 10/33] btrfs: pass walk_control structure to replay_xattr_deletes() fdmanana
2025-09-05 16:09 ` [PATCH 11/33] btrfs: move up the definition of struct walk_control fdmanana
2025-09-05 16:10 ` [PATCH 12/33] btrfs: pass walk_control structure to replay_dir_deletes() fdmanana
2025-09-05 16:10 ` [PATCH 13/33] btrfs: pass walk_control structure to check_item_in_log() fdmanana
2025-09-05 16:10 ` [PATCH 14/33] btrfs: pass walk_control structure to replay_one_extent() fdmanana
2025-09-05 16:10 ` [PATCH 15/33] btrfs: pass walk_control structure to add_inode_ref() and helpers fdmanana
2025-09-05 16:10 ` [PATCH 16/33] btrfs: pass walk_control structure to replay_one_dir_item() and replay_one_name() fdmanana
2025-09-05 16:10 ` [PATCH 17/33] btrfs: pass walk_control structure to drop_one_dir_item() and helpers fdmanana
2025-09-05 16:10 ` [PATCH 18/33] btrfs: pass walk_control structure to replay_one_extent() fdmanana
2025-09-05 16:10 ` [PATCH 19/33] btrfs: use level argument in log tree walk callback process_one_buffer() fdmanana
2025-09-05 16:10 ` [PATCH 20/33] btrfs: use level argument in log tree walk callback replay_one_buffer() fdmanana
2025-09-05 16:10 ` [PATCH 21/33] btrfs: use the inode item boolean everywhere in overwrite_item() fdmanana
2025-09-05 16:10 ` [PATCH 22/33] btrfs: add current log leaf, key and slot to struct walk_control fdmanana
2025-09-05 16:10 ` [PATCH 23/33] btrfs: avoid unnecessary path allocation at fixup_inode_link_count() fdmanana
2025-09-05 16:10 ` [PATCH 24/33] btrfs: avoid path allocations when dropping extents during log replay fdmanana
2025-09-05 16:10 ` [PATCH 25/33] btrfs: avoid unnecessary path allocation when replaying a dir item fdmanana
2025-09-05 16:10 ` [PATCH 26/33] btrfs: remove redundant path release when processing dentry during log replay fdmanana
2025-09-05 16:10 ` [PATCH 27/33] btrfs: remove redundant path release when overwriting item " fdmanana
2025-09-05 16:10 ` [PATCH 28/33] btrfs: add path for subvolume tree changes to struct walk_control fdmanana
2025-09-05 16:10 ` [PATCH 29/33] btrfs: stop passing inode object IDs to __add_inode_ref() in log replay fdmanana
2025-09-05 16:10 ` [PATCH 30/33] btrfs: remove pointless inode lookup when processing extrefs during " fdmanana
2025-09-05 16:10 ` [PATCH 31/33] btrfs: abort transaction if we fail to find dir item " fdmanana
2025-09-05 16:10 ` [PATCH 32/33] btrfs: abort transaction if we fail to update inode in log replay dir fixup fdmanana
2025-09-05 16:10 ` [PATCH 33/33] btrfs: dump detailed info and specific messages on log replay failures fdmanana
2025-09-07 11:25   ` Dan Carpenter
2025-09-08  9:52 ` fdmanana [this message]
2025-09-08  9:52   ` [PATCH v2 01/33] btrfs: fix invalid extref key setup when replaying dentry fdmanana
2025-09-08  9:52   ` [PATCH v2 02/33] btrfs: use booleans in walk control structure for log replay fdmanana
2025-09-08  9:52   ` [PATCH v2 03/33] btrfs: rename replay_dest member of struct walk_control to root fdmanana
2025-09-08  9:52   ` [PATCH v2 04/33] btrfs: rename root to log in walk_down_log_tree() and walk_up_log_tree() fdmanana
2025-09-08  9:52   ` [PATCH v2 05/33] btrfs: add and use a log root field to struct walk_control fdmanana
2025-09-08  9:53   ` [PATCH v2 06/33] btrfs: deduplicate log root free in error paths from btrfs_recover_log_trees() fdmanana
2025-09-08  9:53   ` [PATCH v2 07/33] btrfs: stop passing transaction parameter to log tree walk functions fdmanana
2025-09-08  9:53   ` [PATCH v2 08/33] btrfs: stop setting log_root_tree->log_root to NULL in btrfs_recover_log_trees() fdmanana
2025-09-08  9:53   ` [PATCH v2 09/33] btrfs: always drop log root tree reference in btrfs_replay_log() fdmanana
2025-09-08  9:53   ` [PATCH v2 10/33] btrfs: pass walk_control structure to replay_xattr_deletes() fdmanana
2025-09-08  9:53   ` [PATCH v2 11/33] btrfs: move up the definition of struct walk_control fdmanana
2025-09-08  9:53   ` [PATCH v2 12/33] btrfs: pass walk_control structure to replay_dir_deletes() fdmanana
2025-09-08  9:53   ` [PATCH v2 13/33] btrfs: pass walk_control structure to check_item_in_log() fdmanana
2025-09-08  9:53   ` [PATCH v2 14/33] btrfs: pass walk_control structure to replay_one_extent() fdmanana
2025-09-08  9:53   ` [PATCH v2 15/33] btrfs: pass walk_control structure to add_inode_ref() and helpers fdmanana
2025-09-08  9:53   ` [PATCH v2 16/33] btrfs: pass walk_control structure to replay_one_dir_item() and replay_one_name() fdmanana
2025-09-08  9:53   ` [PATCH v2 17/33] btrfs: pass walk_control structure to drop_one_dir_item() and helpers fdmanana
2025-09-08  9:53   ` [PATCH v2 18/33] btrfs: pass walk_control structure to overwrite_item() fdmanana
2025-09-08  9:53   ` [PATCH v2 19/33] btrfs: use level argument in log tree walk callback process_one_buffer() fdmanana
2025-09-08  9:53   ` [PATCH v2 20/33] btrfs: use level argument in log tree walk callback replay_one_buffer() fdmanana
2025-09-08  9:53   ` [PATCH v2 21/33] btrfs: use the inode item boolean everywhere in overwrite_item() fdmanana
2025-09-08  9:53   ` [PATCH v2 22/33] btrfs: add current log leaf, key and slot to struct walk_control fdmanana
2025-09-08  9:53   ` [PATCH v2 23/33] btrfs: avoid unnecessary path allocation at fixup_inode_link_count() fdmanana
2025-09-08  9:53   ` [PATCH v2 24/33] btrfs: avoid path allocations when dropping extents during log replay fdmanana
2025-09-08  9:53   ` [PATCH v2 25/33] btrfs: avoid unnecessary path allocation when replaying a dir item fdmanana
2025-09-08  9:53   ` [PATCH v2 26/33] btrfs: remove redundant path release when processing dentry during log replay fdmanana
2025-09-08  9:53   ` [PATCH v2 27/33] btrfs: remove redundant path release when overwriting item " fdmanana
2025-09-08  9:53   ` [PATCH v2 28/33] btrfs: add path for subvolume tree changes to struct walk_control fdmanana
2025-09-08  9:53   ` [PATCH v2 29/33] btrfs: stop passing inode object IDs to __add_inode_ref() in log replay fdmanana
2025-09-08  9:53   ` [PATCH v2 30/33] btrfs: remove pointless inode lookup when processing extrefs during " fdmanana
2025-09-08  9:53   ` [PATCH v2 31/33] btrfs: abort transaction if we fail to find dir item " fdmanana
2025-09-08  9:53   ` [PATCH v2 32/33] btrfs: abort transaction if we fail to update inode in log replay dir fixup fdmanana
2025-09-08  9:53   ` [PATCH v2 33/33] btrfs: dump detailed info and specific messages on log replay failures fdmanana
2025-09-09  0:53     ` David Sterba
2025-09-09 14:42       ` Filipe Manana
2025-09-09  0:55   ` [PATCH v2 00/33] btrfs: log replay bug fix, cleanups and error reporting changes David Sterba

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=cover.1757271913.git.fdmanana@suse.com \
    --to=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