btrfs-progs/Documentation/dev
Qu Wenruo 6abbad4d1b btrfs-progs: docs: enhance the error handling guidelines
Currently we only have a very brief explanation on the unexpected error
handling (only ASSERT()/WARN_ON()/BUG_ON()), and no further
recommendation on the proper usage of them.

This patch would improve the guideline by:

- Add btrfs_abort_transaction() usage
  Which is the recommended way when possible.

- More detailed explanation on the usage of ASSERT()
  Which is only a fail-fast option mostly designed for developers, thus
  is only recommended to rule out some invalid function usage.

- More detailed explanation on the usage of WARN_ON()
  Mostly for call sites which need a call trace strongly, and is not
  applicable for a btrfs_abort_transaction() call.

- Completely discourage the usage of BUG_ON()

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-08-28 17:24:24 +02:00
..
Developer-s-FAQ.rst btrfs-progs: docs: formatting updates 2023-07-26 14:59:10 +02:00
Development-notes.rst btrfs-progs: docs: enhance the error handling guidelines 2023-08-28 17:24:24 +02:00
Experimental.rst
On-disk-format.rst btrfs-progs: docs: fix indentation of the ORPHAN_OBJECTID 2023-05-26 18:02:27 +02:00
dev-btrees.rst
dev-btrfs-design.rst btrfs-progs: docs: fixups, references 2023-06-01 20:50:04 +02:00
dev-internal-apis.rst btrfs-progs: docs: add developer docs for internal APIs 2023-08-28 17:24:24 +02:00
dev-json.rst btrfs-progs: docs: add dev docs about json 2023-08-28 17:24:24 +02:00
dev-send-stream.rst