From: Darrick J. Wong Date: Mon, 5 Feb 2024 18:50:15 +0000 (-0800) Subject: bcachefs: time_stats: add larger units X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cdbfa228a5537dfd7cbd8532701b0c8af70c97b8;p=linux.git 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 Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/time_stats.c b/fs/bcachefs/time_stats.c index d2f7ddbf6c313..af97474c445bf 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 }, };