mbox series

[v2,0/5] Serious fixes for different error paths

Message ID cover.1610650736.git.josef@toxicpanda.com (mailing list archive)
Headers show
Series Serious fixes for different error paths | expand

Message

Josef Bacik Jan. 14, 2021, 7:02 p.m. UTC
v1->v2:
- Rebased onto misc-next, dropping everything that's been merged so far.
- Fixed "btrfs: splice remaining dirty_bg's onto the transaction dirty bg list"
  to handle the btrfs_alloc_path() failure and cleaned up the error handling as
  a result of that change.
- dropped "btrfs: don't clear ret in btrfs_start_dirty_block_groups" as I fixed
  it differently in "btrfs: splice remaining dirty_bg's onto the transaction
  dirty bg list"
- Added a link to Zygo's original report in "btrfs: add asserts for deleting
  backref cache nodes".
- Clarified the error condition that lead to the WARN_ON() in the changelog for
  "btrfs: do not WARN_ON() if we can't find the reloc root".
- Added the stack trace that the error injection triggered in order to get the
  error that happened in "btrfs: abort the transaction if we fail to inc ref in
  btrfs_copy_root".

--- Original email ---
Hello,

A lot of these were in previous versions of the relocation error handling
patches.  I added a few since the last go around.  All of these do not rely on
the error handling patches, and some of them are quite important otherwise we
get corruption if we get errors in certain spots.  There's also a few lockdep
fixes and such.  These really need to go in ASAP, regardless of when the
relocation error handling patches are merged.  They're mostly small and self
contained, the only "big" one being the one that tracks the root owner for
relocation reads, which is to resolve the remaining class of lockdep errors we
get because of an improper lockdep class set on the extent buffer.  Thanks,

Josef

Josef Bacik (5):
  btrfs: fix reloc root leak with 0 ref reloc roots on recovery
  btrfs: splice remaining dirty_bg's onto the transaction dirty bg list
  btrfs: do not WARN_ON() if we can't find the reloc root
  btrfs: add asserts for deleting backref cache nodes
  btrfs: abort the transaction if we fail to inc ref in btrfs_copy_root

 fs/btrfs/backref.c     |  2 +-
 fs/btrfs/backref.h     |  9 ++++++---
 fs/btrfs/block-group.c | 19 ++++++++++++-------
 fs/btrfs/ctree.c       |  5 +++--
 fs/btrfs/relocation.c  |  4 +---
 5 files changed, 23 insertions(+), 16 deletions(-)

Comments

David Sterba Jan. 26, 2021, 4:41 p.m. UTC | #1
On Thu, Jan 14, 2021 at 02:02:41PM -0500, Josef Bacik wrote:
> v1->v2:
> - Rebased onto misc-next, dropping everything that's been merged so far.
> - Fixed "btrfs: splice remaining dirty_bg's onto the transaction dirty bg list"
>   to handle the btrfs_alloc_path() failure and cleaned up the error handling as
>   a result of that change.
> - dropped "btrfs: don't clear ret in btrfs_start_dirty_block_groups" as I fixed
>   it differently in "btrfs: splice remaining dirty_bg's onto the transaction
>   dirty bg list"
> - Added a link to Zygo's original report in "btrfs: add asserts for deleting
>   backref cache nodes".
> - Clarified the error condition that lead to the WARN_ON() in the changelog for
>   "btrfs: do not WARN_ON() if we can't find the reloc root".
> - Added the stack trace that the error injection triggered in order to get the
>   error that happened in "btrfs: abort the transaction if we fail to inc ref in
>   btrfs_copy_root".

Added to misc-next, thanks.