diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-06-17 20:12:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:34 -0400 |
commit | 50b13beef09f445e1fb8fbf1e1f852df06baf05a (patch) | |
tree | a6b120f5d24aca22fd26b61d1c259635200a335b /fs/bcachefs/bkey_methods.c | |
parent | 2ed6248ab3a58dbbe5819cbd0e60e4e3a5b72c47 (diff) |
bcachefs: Improve an error message
When inserting a key type that's not valid for a given btree, we should
print out which btree we were inserting into.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bkey_methods.c')
-rw-r--r-- | fs/bcachefs/bkey_methods.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/bkey_methods.c b/fs/bcachefs/bkey_methods.c index 390ea41414bc..f2351e5ee7c1 100644 --- a/fs/bcachefs/bkey_methods.c +++ b/fs/bcachefs/bkey_methods.c @@ -207,8 +207,8 @@ int __bch2_bkey_invalid(struct bch_fs *c, struct bkey_s_c k, } if (!(bch2_key_types_allowed[type] & (1U << k.k->type))) { - prt_printf(err, "invalid key type for this btree (%s)", - bch2_bkey_types[type]); + prt_printf(err, "invalid key type for btree %s (%s)", + bch2_btree_ids[type], bch2_bkey_types[k.k->type]); return -EINVAL; } |