diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-08-03 21:42:37 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:10:09 +0300 |
commit | 6c6439650ec913c83d48055da63b8f204075afb7 (patch) | |
tree | b5aaaab5c386ffbb6a029890601638ed4ee2512d /fs/bcachefs/bkey.h | |
parent | dde8cb11645b7d95766dfd13f273facde27923a9 (diff) | |
download | linux-6c6439650ec913c83d48055da63b8f204075afb7.tar.xz |
bcachefs: bkey_format helper improvements
- add a to_text() method for bkey_format
- convert bch2_bkey_format_validate() to modern error message style,
where we pass a printbuf for the error string instead of returning a
static string
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bkey.h')
-rw-r--r-- | fs/bcachefs/bkey.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/bkey.h b/fs/bcachefs/bkey.h index e81fb3e00c60..644caa2b2b25 100644 --- a/fs/bcachefs/bkey.h +++ b/fs/bcachefs/bkey.h @@ -769,6 +769,7 @@ static inline void bch2_bkey_format_add_key(struct bkey_format_state *s, const s void bch2_bkey_format_add_pos(struct bkey_format_state *, struct bpos); struct bkey_format bch2_bkey_format_done(struct bkey_format_state *); -const char *bch2_bkey_format_validate(struct bkey_format *); +int bch2_bkey_format_validate(struct bkey_format *, struct printbuf *); +void bch2_bkey_format_to_text(struct printbuf *, const struct bkey_format *); #endif /* _BCACHEFS_BKEY_H */ |