forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'bcachefs-2024-03-13' of https://evilpiepirate.org/git/bcac…
…hefs Pull bcachefs updates from Kent Overstreet: - Subvolume children btree; this is needed for providing a userspace interface for walking subvolumes, which will come later - Lots of improvements to directory structure checking - Improved journal pipelining, significantly improving performance on high iodepth write workloads - Discard path improvements: the discard path is more efficient, and no longer flushes the journal unnecessarily - Buffered write path can now avoid taking the inode lock - new mm helper: memalloc_flags_{save|restore} - mempool now does kvmalloc mempools * tag 'bcachefs-2024-03-13' of https://evilpiepirate.org/git/bcachefs: (128 commits) bcachefs: time_stats: shrink time_stat_buffer for better alignment bcachefs: time_stats: split stats-with-quantiles into a separate structure bcachefs: mean_and_variance: put struct mean_and_variance_weighted on a diet bcachefs: time_stats: add larger units bcachefs: pull out time_stats.[ch] bcachefs: reconstruct_alloc cleanup bcachefs: fix bch_folio_sector padding bcachefs: Fix btree key cache coherency during replay bcachefs: Always flush write buffer in delete_dead_inodes() bcachefs: Fix order of gc_done passes bcachefs: fix deletion of indirect extents in btree_gc bcachefs: Prefer struct_size over open coded arithmetic bcachefs: Kill unused flags argument to btree_split() bcachefs: Check for writing superblocks with nonsense member seq fields bcachefs: fix bch2_journal_buf_to_text() lib/generic-radix-tree.c: Make nodes more reasonably sized bcachefs: copy_(to|from)_user_errcode() bcachefs: Split out bkey_types.h bcachefs: fix lost journal buf wakeup due to improved pipelining bcachefs: intercept mountoption value for bool type ...
- Loading branch information
Showing
95 changed files
with
3,770 additions
and
2,253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.. SPDX-License-Identifier: GPL-2.0 | ||
bcachefs private error codes | ||
---------------------------- | ||
|
||
In bcachefs, as a hard rule we do not throw or directly use standard error | ||
codes (-EINVAL, -EBUSY, etc.). Instead, we define private error codes as needed | ||
in fs/bcachefs/errcode.h. | ||
|
||
This gives us much better error messages and makes debugging much easier. Any | ||
direct uses of standard error codes you see in the source code are simply old | ||
code that has yet to be converted - feel free to clean it up! | ||
|
||
Private error codes may subtype another error code, this allows for grouping of | ||
related errors that should be handled similarly (e.g. transaction restart | ||
errors), as well as specifying which standard error code should be returned at | ||
the bcachefs module boundary. | ||
|
||
At the module boundary, we use bch2_err_class() to convert to a standard error | ||
code; this also emits a trace event so that the original error code be | ||
recovered even if it wasn't logged. | ||
|
||
Do not reuse error codes! Generally speaking, a private error code should only | ||
be thrown in one place. That means that when we see it in a log message we can | ||
see, unambiguously, exactly which file and line number it was returned from. | ||
|
||
Try to give error codes names that are as reasonably descriptive of the error | ||
as possible. Frequently, the error will be logged at a place far removed from | ||
where the error was generated; good names for error codes mean much more | ||
descriptive and useful error messages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.