diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-02-01 12:41:42 -0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-13 21:38:01 -0400 |
commit | 273960b8f374b95ebd234a99607b7887f515c791 (patch) | |
tree | b50ec6f9658860cb3930b675b4b8cf5a9937bf2b /fs/bcachefs/sysfs.c | |
parent | 4b4f0876ab74167cc402ccd5ce9154e7dc666829 (diff) | |
download | linux-273960b8f374b95ebd234a99607b7887f515c791.tar.gz linux-273960b8f374b95ebd234a99607b7887f515c791.tar.bz2 linux-273960b8f374b95ebd234a99607b7887f515c791.zip |
bcachefs: time_stats: split stats-with-quantiles into a separate structure
Currently, struct time_stats has the optional ability to quantize the
information that it collects. This is /probably/ useful for callers who
want to see quantized information, but it more than doubles the size of
the structure from 224 bytes to 464. For users who don't care about
that (e.g. upcoming xfs patches) and want to avoid wasting 240 bytes per
counter, split the two into separate pieces.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
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 cee80c47feea..c86a93a8d8fc 100644 --- a/fs/bcachefs/sysfs.c +++ b/fs/bcachefs/sysfs.c @@ -930,10 +930,10 @@ SHOW(bch2_dev) sysfs_print(io_latency_write, atomic64_read(&ca->cur_latency[WRITE])); if (attr == &sysfs_io_latency_stats_read) - bch2_time_stats_to_text(out, &ca->io_latency[READ]); + bch2_time_stats_to_text(out, &ca->io_latency[READ].stats); if (attr == &sysfs_io_latency_stats_write) - bch2_time_stats_to_text(out, &ca->io_latency[WRITE]); + bch2_time_stats_to_text(out, &ca->io_latency[WRITE].stats); sysfs_printf(congested, "%u%%", clamp(atomic_read(&ca->congested), 0, CONGESTED_MAX) |