diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-02-05 21:50:15 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-14 04:37:54 +0300 |
commit | cdbfa228a5537dfd7cbd8532701b0c8af70c97b8 (patch) | |
tree | 36e3f0f45b9e33e856b7e3355d0fda75a05bd822 | |
parent | f1ca1abfb0275db241363743ed3606b25b2b1a5c (diff) | |
download | linux-cdbfa228a5537dfd7cbd8532701b0c8af70c97b8.tar.xz |
bcachefs: time_stats: add larger units
Filesystems can stay mounted for a very long time, so add some larger
units.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/time_stats.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/time_stats.c b/fs/bcachefs/time_stats.c index d2f7ddbf6c31..af97474c445b 100644 --- a/fs/bcachefs/time_stats.c +++ b/fs/bcachefs/time_stats.c @@ -17,6 +17,9 @@ static const struct time_unit time_units[] = { { "s", NSEC_PER_SEC }, { "m", (u64) NSEC_PER_SEC * 60}, { "h", (u64) NSEC_PER_SEC * 3600}, + { "d", (u64) NSEC_PER_SEC * 3600 * 24}, + { "w", (u64) NSEC_PER_SEC * 3600 * 24 * 7}, + { "y", (u64) NSEC_PER_SEC * ((3600 * 24 * 7 * 365) + (3600 * (24 / 4) * 7))}, /* 365.25d */ { "eon", U64_MAX }, }; |