All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs-progs: Handle error properly in btrfs_commit_transaction()
@ 2019-04-16  7:15 Qu Wenruo
  2019-04-16  7:15 ` [PATCH 1/3] btrfs-progs: Remove the dead branch in btrfs_run_delayed_refs() Qu Wenruo
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Qu Wenruo @ 2019-04-16  7:15 UTC (permalink / raw)
  To: linux-btrfs

This patchset can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/commit_failure_cleanup

This patchset will address the BUG_ON() triggered in fuzz-tests/003 and
fuzz-tests/009.

For proper error handling in btrfs_commit_transaction(), we need a way
to clean up per-transaction data properly.

Currently we only have delayed refs which are per-transaction, so
introduce a new function, btrfs_destroy_delayed_refs() to cleanup
delayed refs.

Now btrfs_commit_transaction() can error out gracefully with proper
cleanup.

Patch 1 and 2 are just some minor cleanups found when crafting the 3rd
patch.

Qu Wenruo (3):
  btrfs-progs: Remove the dead branch in btrfs_run_delayed_refs()
  btrfs-progs: Refactor btrfs_finish_extent_commit()
  btrfs-progs: Handle error properly in btrfs_commit_transaction()

 ctree.h       |  4 +---
 delayed-ref.c | 24 ++++++++++++++++++++++++
 delayed-ref.h |  5 +++++
 extent-tree.c | 22 +++++++++-------------
 transaction.c | 23 +++++++++++++++--------
 5 files changed, 54 insertions(+), 24 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-13 13:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16  7:15 [PATCH 0/3] btrfs-progs: Handle error properly in btrfs_commit_transaction() Qu Wenruo
2019-04-16  7:15 ` [PATCH 1/3] btrfs-progs: Remove the dead branch in btrfs_run_delayed_refs() Qu Wenruo
2019-04-16  7:36   ` Nikolay Borisov
2019-04-16  7:15 ` [PATCH 2/3] btrfs-progs: Refactor btrfs_finish_extent_commit() Qu Wenruo
2019-04-16  7:39   ` Nikolay Borisov
2019-04-16  7:15 ` [PATCH 3/3] btrfs-progs: Handle error properly in btrfs_commit_transaction() Qu Wenruo
2019-04-16  7:48   ` Nikolay Borisov
2019-05-13 13:55 ` [PATCH 0/3] " David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.