diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-06 20:57:43 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-21 06:01:45 -0500 |
commit | e58f963cecbdb08f28334122afba93a7840beabc (patch) | |
tree | 0a5e9dd89fceeb1fbd8550958dfe44d1d7981cad /fs/bcachefs/sysfs.c | |
parent | 38c23fb809f60bda1adfc431b18200b8f68c2025 (diff) | |
download | linux-e58f963cecbdb08f28334122afba93a7840beabc.tar.gz linux-e58f963cecbdb08f28334122afba93a7840beabc.tar.bz2 linux-e58f963cecbdb08f28334122afba93a7840beabc.zip |
bcachefs: helpers for printing data types
We need bounds checking since new versions may introduce new data types.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sysfs.c')
-rw-r--r-- | fs/bcachefs/sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c index 8ed52319ff68..434961e400e2 100644 --- a/fs/bcachefs/sysfs.c +++ b/fs/bcachefs/sysfs.c @@ -883,7 +883,7 @@ static void dev_io_done_to_text(struct printbuf *out, struct bch_dev *ca) for (i = 1; i < BCH_DATA_NR; i++) prt_printf(out, "%-12s:%12llu\n", - bch2_data_types[i], + bch2_data_type_str(i), percpu_u64_get(&ca->io_done->sectors[rw][i]) << 9); } } @@ -908,7 +908,7 @@ SHOW(bch2_dev) } if (attr == &sysfs_has_data) { - prt_bitflags(out, bch2_data_types, bch2_dev_has_data(c, ca)); + prt_bitflags(out, __bch2_data_types, bch2_dev_has_data(c, ca)); prt_char(out, '\n'); } |