projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1ca1ab
)
bcachefs: time_stats: add larger units
author
Darrick J. Wong
<djwong@kernel.org>
Mon, 5 Feb 2024 18:50:15 +0000
(10:50 -0800)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Thu, 14 Mar 2024 01:37:54 +0000
(21:37 -0400)
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>
fs/bcachefs/time_stats.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/bcachefs/time_stats.c
b/fs/bcachefs/time_stats.c
index d2f7ddbf6c313ff20182f3552cbbf0808a3ffb1c..af97474c445bfb3e24d4abcd698a29e366ee960d 100644
(file)
--- 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 },
};