summaryrefslogtreecommitdiff
path: root/fs/bcachefs/str_hash.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-09-19 00:10:33 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:40 +0300
commit098ef98d5bff461c66c3798fbebca7b1c06fdf79 (patch)
tree02879fcbd6d74a5a05a46ad399a73dac4aafd33b /fs/bcachefs/str_hash.h
parent5c1ef830f6786059f85bebe7501b63dffed0b633 (diff)
downloadlinux-098ef98d5bff461c66c3798fbebca7b1c06fdf79.tar.xz
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/str_hash.h')
-rw-r--r--fs/bcachefs/str_hash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/str_hash.h b/fs/bcachefs/str_hash.h
index 560983df13f0..6178ae620ff1 100644
--- a/fs/bcachefs/str_hash.h
+++ b/fs/bcachefs/str_hash.h
@@ -207,7 +207,7 @@ bch2_hash_hole(struct btree_trans *trans,
return 0;
bch2_trans_iter_exit(trans, iter);
- return ret ?: -ENOSPC;
+ return ret ?: -BCH_ERR_ENOSPC_str_hash_create;
}
static __always_inline
@@ -277,7 +277,7 @@ int bch2_hash_set_snapshot(struct btree_trans *trans,
}
if (!ret)
- ret = -ENOSPC;
+ ret = -BCH_ERR_ENOSPC_str_hash_create;
out:
bch2_trans_iter_exit(trans, &slot);
bch2_trans_iter_exit(trans, &iter);