Skip to content

Serious fixes for different error paths

Josef Bacik linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 1 replyIn review
  2. v113 patches 12 repliesSuperseded

Changes in v2 from the cover letter

- 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".

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5btrfs: fix reloc root leak with 0 ref reloc roots on recoveryfs/btrfs/relocation.c+1 -30 replies
2/5btrfs: splice remaining dirty_bg's onto the transaction dirty bg listfs/btrfs/block-group.c+12 -70 replies
3/5btrfs: do not WARN_ON() if we can't find the reloc rootfs/btrfs/backref.c+1 -10 replies
4/5btrfs: add asserts for deleting backref cache nodesfs/btrfs/backref.h+6 -30 replies
5/5btrfs: abort the transaction if we fail to inc ref in btrfs_copy_rootfs/btrfs/ctree.c+3 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/5] Serious fixes for different error paths

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(-)
Signature · 1 line
2.26.2