diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-07 03:01:47 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-21 12:01:45 +0100 |
commit | 4f564f4f9fdd4d120ee04678b0c22e40cc8b6b47 (patch) | |
tree | e8c593d20f6004d9601bce00d6f02031ffa217ff /fs/bcachefs/sysfs.c | |
parent | bcachefs: helpers for printing data types (diff) | |
download | linux-4f564f4f9fdd4d120ee04678b0c22e40cc8b6b47.tar.xz linux-4f564f4f9fdd4d120ee04678b0c22e40cc8b6b47.zip |
bcachefs: bch2_prt_compression_type()
bounds checking helper, since compression types are extensible
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c index 434961e400e2..553190d719df 100644 --- a/fs/bcachefs/sysfs.c +++ b/fs/bcachefs/sysfs.c @@ -21,6 +21,7 @@ #include "btree_gc.h" #include "buckets.h" #include "clock.h" +#include "compress.h" #include "disk_groups.h" #include "ec.h" #include "inode.h" @@ -330,7 +331,7 @@ static int bch2_compression_stats_to_text(struct printbuf *out, struct bch_fs *c prt_newline(out); for (unsigned i = 0; i < ARRAY_SIZE(s); i++) { - prt_str(out, bch2_compression_types[i]); + bch2_prt_compression_type(out, i); prt_tab(out); prt_human_readable_u64(out, s[i].sectors_compressed << 9); |