Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bcachefs: Fix sysfs rebalance duration waited formatting

cat /sys/fs/bcachefs/*/internal/rebalance_status
waiting
io wait duration: 13.5 GiB
io wait remaining: 627 MiB
duration waited: 1392 m

duration waited was increasing at a rate of about 14 times the expected
rate.

div_u64 takes a u32 divisor, but u->nsecs (from time_units[]) can be
bigger than u32.

Signed-off-by: Feiko Nanninga <feiko.nanninga@fnanninga.de>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

authored by

Feiko Nanninga and committed by
Kent Overstreet
36f0af4f a3ed1cc4

+1 -1
+1 -1
fs/bcachefs/util.c
··· 360 360 { 361 361 const struct time_unit *u = bch2_pick_time_units(ns); 362 362 363 - prt_printf(out, "%llu %s", div_u64(ns, u->nsecs), u->name); 363 + prt_printf(out, "%llu %s", div64_u64(ns, u->nsecs), u->name); 364 364 } 365 365 366 366 static void bch2_pr_time_units_aligned(struct printbuf *out, u64 ns)