diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-09-18 17:10:33 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:40 -0400 |
commit | 098ef98d5bff461c66c3798fbebca7b1c06fdf79 (patch) | |
tree | 02879fcbd6d74a5a05a46ad399a73dac4aafd33b /fs/bcachefs/errcode.h | |
parent | 5c1ef830f6786059f85bebe7501b63dffed0b633 (diff) | |
download | linux-098ef98d5bff461c66c3798fbebca7b1c06fdf79.tar.gz linux-098ef98d5bff461c66c3798fbebca7b1c06fdf79.tar.bz2 linux-098ef98d5bff461c66c3798fbebca7b1c06fdf79.zip |
bcachefs: Add private error codes for ENOSPC
Continuing the saga of introducing private dedicated error codes for
each error path, this patch converts ENOSPC to error codes that are
subtypes of ENOSPC. We've recently had a test failure where we got
-ENOSPC where we shouldn't have, and didn't have enough information to
tell where it came from, so this patch will solve that problem.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/errcode.h')
-rw-r--r-- | fs/bcachefs/errcode.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/bcachefs/errcode.h b/fs/bcachefs/errcode.h index 2088cc5a4f3c..3dc477eb3600 100644 --- a/fs/bcachefs/errcode.h +++ b/fs/bcachefs/errcode.h @@ -2,7 +2,21 @@ #ifndef _BCACHEFS_ERRCODE_H #define _BCACHEFS_ERRCODE_H -#define BCH_ERRCODES() \ +#define BCH_ERRCODES() \ + x(ENOSPC, ENOSPC_disk_reservation) \ + x(ENOSPC, ENOSPC_bucket_alloc) \ + x(ENOSPC, ENOSPC_disk_label_add) \ + x(ENOSPC, ENOSPC_stripe_create) \ + x(ENOSPC, ENOSPC_stripe_reuse) \ + x(ENOSPC, ENOSPC_inode_create) \ + x(ENOSPC, ENOSPC_str_hash_create) \ + x(ENOSPC, ENOSPC_snapshot_create) \ + x(ENOSPC, ENOSPC_subvolume_create) \ + x(ENOSPC, ENOSPC_sb) \ + x(ENOSPC, ENOSPC_sb_journal) \ + x(ENOSPC, ENOSPC_sb_quota) \ + x(ENOSPC, ENOSPC_sb_replicas) \ + x(ENOSPC, ENOSPC_sb_members) \ x(0, open_buckets_empty) \ x(0, freelist_empty) \ x(BCH_ERR_freelist_empty, no_buckets_found) \ |