linux-stable/fs/bcachefs
Kent Overstreet 615f867c14 bcachefs: Improved errcodes
Instead of overloading standard error codes (EINTR/EAGAIN), and defining
short lists of error codes in multiple places that potentially end up
overlapping & conflicting, we're now going to have one master list of
error codes.

Error codes are defined with an x-macro: thus we also have
bch2_err_str() now.

Also, error codes have a class field. Now, instead of checking for
errors with ==, code should use bch2_err_matches(), which returns true
if the error is equal to or a sub-error of the error class.

This means we can define unique errors for every source location where
an error is generated, which will help improve our error messages.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-22 17:09:36 -04:00
..
Kconfig bcachefs: Improved errcodes 2023-10-22 17:09:36 -04:00
Makefile bcachefs: Improved errcodes 2023-10-22 17:09:36 -04:00
acl.c bcachefs: bch2_assert_pos_locked() 2023-10-22 17:09:16 -04:00
acl.h bcachefs: Plumb through subvolume id 2023-10-22 17:09:12 -04:00
alloc_background.c bcachefs: Improved errcodes 2023-10-22 17:09:36 -04:00
alloc_background.h bcachefs: Fix should_invalidate_buckets() 2023-10-22 17:09:36 -04:00
alloc_foreground.c bcachefs: Improved errcodes 2023-10-22 17:09:36 -04:00
alloc_foreground.h bcachefs: Kill allocator threads & freelists 2023-10-22 17:09:29 -04:00
alloc_types.h bcachefs: Fold bucket_state in to BCH_DATA_TYPES() 2023-10-22 17:09:30 -04:00
bcachefs.h bcachefs: added lock held time stats 2023-10-22 17:09:35 -04:00
bcachefs_format.h bcachefs: Add a persistent counter for bucket discards 2023-10-22 17:09:33 -04:00
bcachefs_ioctl.h bcachefs: Fold bucket_state in to BCH_DATA_TYPES() 2023-10-22 17:09:30 -04:00
bkey.c bcachefs: Heap allocate printbufs 2023-10-22 17:09:25 -04:00
bkey.h bcachefs: Whiteouts for snapshots 2023-10-22 17:09:12 -04:00
bkey_buf.h bcachefs: Reduce/kill BKEY_PADDED use 2023-10-22 17:08:50 -04:00
bkey_methods.c bcachefs: Improve an error message 2023-10-22 17:09:34 -04:00
bkey_methods.h bcachefs: Plumb btree_id & level to trans_mark 2023-10-22 17:09:32 -04:00
bkey_sort.c bcachefs: Don't call bch2_bkey_transform() unnecessarily 2023-10-22 17:09:19 -04:00
bkey_sort.h bcachefs: Kill bch2_sort_repack_merge() 2023-10-22 17:09:19 -04:00
bset.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
bset.h bcachefs: Kill bch2_bset_fix_invalidated_key() 2023-10-22 17:09:21 -04:00
btree_cache.c bcachefs: lock time stats prep work. 2023-10-22 17:09:35 -04:00
btree_cache.h bcachefs: Fix usage of six lock's percpu mode 2023-10-22 17:09:26 -04:00
btree_gc.c bcachefs: Convert bch2_gc_done() for_each_btree_key2() 2023-10-22 17:09:36 -04:00
btree_gc.h bcachefs: Fix a null ptr deref 2023-10-22 17:09:31 -04:00
btree_io.c bcachefs: Fix btree node read retries 2023-10-22 17:09:33 -04:00
btree_io.h bcachefs: Shutdown path improvements 2023-10-22 17:09:32 -04:00
btree_iter.c bcachefs: Add a counter for btree_trans restarts 2023-10-22 17:09:36 -04:00
btree_iter.h bcachefs: Add a counter for btree_trans restarts 2023-10-22 17:09:36 -04:00
btree_key_cache.c bcachefs: added lock held time stats 2023-10-22 17:09:35 -04:00
btree_key_cache.h bcachefs: Btree key cache coherency 2023-10-22 17:09:23 -04:00
btree_locking.h bcachefs: added lock held time stats 2023-10-22 17:09:35 -04:00
btree_types.h bcachefs: Add a counter for btree_trans restarts 2023-10-22 17:09:36 -04:00
btree_update.h bcachefs: Add a counter for btree_trans restarts 2023-10-22 17:09:36 -04:00
btree_update_interior.c bcachefs: lock time stats prep work. 2023-10-22 17:09:35 -04:00
btree_update_interior.h bcachefs: Shutdown path improvements 2023-10-22 17:09:32 -04:00
btree_update_leaf.c bcachefs: Always use percpu_ref_tryget_live() on c->writes 2023-10-22 17:09:34 -04:00
buckets.c bcachefs: bch2_trans_run() 2023-10-22 17:09:36 -04:00
buckets.h bcachefs: fix __dev_available(). 2023-10-22 17:09:34 -04:00
buckets_types.h bcachefs: Fold bucket_state in to BCH_DATA_TYPES() 2023-10-22 17:09:30 -04:00
buckets_waiting_for_journal.c bcachefs: New data structure for buckets waiting on journal commit 2023-10-22 17:09:22 -04:00
buckets_waiting_for_journal.h bcachefs: New data structure for buckets waiting on journal commit 2023-10-22 17:09:22 -04:00
buckets_waiting_for_journal_types.h bcachefs: New data structure for buckets waiting on journal commit 2023-10-22 17:09:22 -04:00
chardev.c bcachefs: Fold bucket_state in to BCH_DATA_TYPES() 2023-10-22 17:09:30 -04:00
chardev.h
checksum.c bcachefs: Improve checksum error messages 2023-10-22 17:09:34 -04:00
checksum.h bcachefs: Check for errors from crypto_skcipher_encrypt() 2023-10-22 17:09:24 -04:00
clock.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
clock.h bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
clock_types.h bcachefs: Persist 64 bit io clocks 2023-10-22 17:08:52 -04:00
compress.c bcachefs: Turn encoded_extent_max into a regular option 2023-10-22 17:09:19 -04:00
compress.h
counters.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
counters.h bcachefs: Add persistent counters 2023-10-22 17:09:32 -04:00
darray.h bcachefs: darrays 2023-10-22 17:09:28 -04:00
data_update.c bcachefs: Switch data_update path to snapshot_id_list 2023-10-22 17:09:35 -04:00
data_update.h bcachefs: Redo data_update interface 2023-10-22 17:09:34 -04:00
debug.c bcachefs: added lock held time stats 2023-10-22 17:09:35 -04:00
debug.h bcachefs: Update bch2_btree_verify() 2023-10-22 17:09:01 -04:00
dirent.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
dirent.h bcachefs: Add rw to .key_invalid() 2023-10-22 17:09:30 -04:00
disk_groups.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
disk_groups.h bcachefs: Convert bch2_sb_to_text to master option list 2023-10-22 17:09:27 -04:00
ec.c bcachefs: ec_stripe_bkey_insert() -> for_each_btree_key_norestart() 2023-10-22 17:09:36 -04:00
ec.h bcachefs: Pull out data_update.c 2023-10-22 17:09:34 -04:00
ec_types.h bcachefs: Split out struct gc_stripe from struct stripe 2023-10-22 17:09:18 -04:00
errcode.c bcachefs: Improved errcodes 2023-10-22 17:09:36 -04:00
errcode.h bcachefs: Improved errcodes 2023-10-22 17:09:36 -04:00
error.c bcachefs: Log message improvements 2023-10-22 17:09:23 -04:00
error.h bcachefs: bch2_trans_inconsistent() 2023-10-22 17:09:27 -04:00
extent_update.c bcachefs: Freespace, need_discard btrees 2023-10-22 17:09:29 -04:00
extent_update.h bcachefs: Reduce iter->trans usage 2023-10-22 17:09:10 -04:00
extents.c bcachefs: Redo data_update interface 2023-10-22 17:09:34 -04:00
extents.h bcachefs: Redo data_update interface 2023-10-22 17:09:34 -04:00
extents_types.h bcachefs: Limit pointers to being in only one stripe 2023-10-22 17:08:29 -04:00
eytzinger.h bcachefs: Make eytzinger size parameter more conventional 2023-10-22 17:09:21 -04:00
fifo.h bcachefs: Convert bucket invalidation to key marking path 2023-10-22 17:08:16 -04:00
fs-common.c bcachefs: Don't BUG_ON() inode link count underflow 2023-10-22 17:09:34 -04:00
fs-common.h bcachefs: Add BCH_SUBVOLUME_UNLINKED 2023-10-22 17:09:15 -04:00
fs-io.c bcachefs: Always use percpu_ref_tryget_live() on c->writes 2023-10-22 17:09:34 -04:00
fs-io.h bcachefs: Delete bch_writepage 2023-10-22 17:09:32 -04:00
fs-ioctl.c bcachefs: Add BCH_SUBVOLUME_UNLINKED 2023-10-22 17:09:15 -04:00
fs-ioctl.h bcachefs: Fix mtime/ctime updates 2023-10-22 17:08:07 -04:00
fs.c bcachefs: Rename __bch2_trans_do() -> commit_do() 2023-10-22 17:09:35 -04:00
fs.h bcachefs: darrays 2023-10-22 17:09:28 -04:00
fsck.c bcachefs: Improved errcodes 2023-10-22 17:09:36 -04:00
fsck.h bcachefs: Drop bch2_fsck_inode_nlink() 2023-10-22 17:08:59 -04:00
inode.c bcachefs: Don't BUG_ON() inode link count underflow 2023-10-22 17:09:34 -04:00
inode.h bcachefs: Don't BUG_ON() inode link count underflow 2023-10-22 17:09:34 -04:00
io.c bcachefs: Get ref on c->writes in move.c 2023-10-22 17:09:35 -04:00
io.h bcachefs: Run btree updates after write out of write_point 2023-10-22 17:09:29 -04:00
io_types.h bcachefs: Run btree updates after write out of write_point 2023-10-22 17:09:29 -04:00
journal.c bcachefs: bch2_trans_run() 2023-10-22 17:09:36 -04:00
journal.h bcachefs: Refactor journal entry adding 2023-10-22 17:09:33 -04:00
journal_io.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
journal_io.h bcachefs: Use a genradix for reading journal entries 2023-10-22 17:09:30 -04:00
journal_reclaim.c bcachefs: Tracepoint improvements 2023-10-22 17:09:32 -04:00
journal_reclaim.h bcachefs: Make sure to initialize j->last_flushed 2023-10-22 17:09:02 -04:00
journal_sb.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
journal_sb.h bcachefs: bch_sb_field_journal_v2 2023-10-22 17:09:29 -04:00
journal_seq_blacklist.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
journal_seq_blacklist.h Revert "bcachefs: Delete some obsolete journal_seq_blacklist code" 2023-10-22 17:09:21 -04:00
journal_types.h bcachefs: Introduce a separate journal watermark for copygc 2023-10-22 17:09:29 -04:00
keylist.c bcachefs: Fix bch2_verify_keylist_sorted 2023-10-22 17:09:02 -04:00
keylist.h bcachefs: Interior btree updates are now fully transactional 2023-10-22 17:08:40 -04:00
keylist_types.h
lru.c bcachefs: Convert bch2_check_lrus() to for_each_btree_key_commit() 2023-10-22 17:09:36 -04:00
lru.h bcachefs: LRU repair tweaks 2023-10-22 17:09:32 -04:00
migrate.c bcachefs: Convert bch2_dev_usrdata_drop() to for_each_btree_key2() 2023-10-22 17:09:36 -04:00
migrate.h
move.c bcachefs: Fix move path when move_stats == NULL 2023-10-22 17:09:35 -04:00
move.h bcachefs: move.c refactoring 2023-10-22 17:09:35 -04:00
move_types.h bcachefs: add progress stats to sysfs 2023-10-22 17:09:10 -04:00
movinggc.c bcachefs: move.c refactoring 2023-10-22 17:09:35 -04:00
movinggc.h bcachefs: Improve bucket_alloc_fail tracepoint 2023-10-22 17:09:36 -04:00
opts.c bcachefs: Improve an error message 2023-10-22 17:09:34 -04:00
opts.h bcachefs: Make verbose option settable at runtime 2023-10-22 17:09:34 -04:00
printbuf.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
printbuf.h bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
quota.c bcachefs: Convert more quota code to for_each_btree_key2() 2023-10-22 17:09:36 -04:00
quota.h bcachefs: Add rw to .key_invalid() 2023-10-22 17:09:30 -04:00
quota_types.h bcachefs: bch2_fs_quota_transfer 2023-10-22 17:08:13 -04:00
rebalance.c bcachefs: move.c refactoring 2023-10-22 17:09:35 -04:00
rebalance.h bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
rebalance_types.h bcachefs: add progress stats to sysfs 2023-10-22 17:09:10 -04:00
recovery.c bcachefs: We can handle missing btree roots for all alloc btrees 2023-10-22 17:09:36 -04:00
recovery.h bcachefs: Fix btree_and_journal_iter 2023-10-22 17:09:33 -04:00
reflink.c bcachefs: Always use percpu_ref_tryget_live() on c->writes 2023-10-22 17:09:34 -04:00
reflink.h bcachefs: Plumb btree_id & level to trans_mark 2023-10-22 17:09:32 -04:00
replicas.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
replicas.h bcachefs: Add .to_text() methods for all superblock sections 2023-10-22 17:09:24 -04:00
replicas_types.h bcachefs: Switch replicas to mark_lock 2023-10-22 17:08:13 -04:00
siphash.c
siphash.h
six.c
six.h
str_hash.h bcachefs: bch2_btree_iter_peek_upto() 2023-10-22 17:09:27 -04:00
subvolume.c bcachefs: Convert subvol code to for_each_btree_key_commit() 2023-10-22 17:09:36 -04:00
subvolume.h bcachefs: Improve snapshots_seen 2023-10-22 17:09:35 -04:00
subvolume_types.h bcachefs: darrays 2023-10-22 17:09:28 -04:00
super-io.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
super-io.h bcachefs: Freespace, need_discard btrees 2023-10-22 17:09:29 -04:00
super.c bcachefs: Call bch2_do_invalidates() when going read write 2023-10-22 17:09:33 -04:00
super.h bcachefs: Fix assertion in bch2_dev_list_add_dev() 2023-10-22 17:09:34 -04:00
super_types.h bcachefs: Freespace, need_discard btrees 2023-10-22 17:09:29 -04:00
sysfs.c bcachefs: Always use percpu_ref_tryget_live() on c->writes 2023-10-22 17:09:34 -04:00
sysfs.h bcachefs: Add persistent counters 2023-10-22 17:09:32 -04:00
tests.c bcachefs: Rename __bch2_trans_do() -> commit_do() 2023-10-22 17:09:35 -04:00
tests.h bcachefs: Add error handling to unit & perf tests 2023-10-22 17:08:48 -04:00
trace.c
trace.h bcachefs: Improved errcodes 2023-10-22 17:09:36 -04:00
util.c bcachefs: bch2_time_stats_to_text now indents properly 2023-10-22 17:09:35 -04:00
util.h bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
varint.c bcachefs: Add a valgrind memcheck hint 2023-10-22 17:09:13 -04:00
varint.h bcachefs: Add safe versions of varint encode/decode 2023-10-22 17:09:08 -04:00
vstructs.h bcachefs: Fix 32 bit build 2023-10-22 17:09:25 -04:00
xattr.c bcachefs: Printbuf rework 2023-10-22 17:09:33 -04:00
xattr.h bcachefs: Add rw to .key_invalid() 2023-10-22 17:09:30 -04:00