projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ebd2b0c
)
drbd: cosmetic: fix accidental division instead of modulo when pretty printing
author
Lars Ellenberg
<lars.ellenberg@linbit.com>
Fri, 3 Jun 2011 19:13:17 +0000
(21:13 +0200)
committer
Philipp Reisner
<philipp.reisner@linbit.com>
Wed, 9 May 2012 08:01:39 +0000
(10:01 +0200)
For large resync rates, seq_printf_with_thousands_grouping()
accidentally only produced Y,000,00Y, instead of the real numbers.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_proc.c
patch
|
blob
|
history
diff --git
a/drivers/block/drbd/drbd_proc.c
b/drivers/block/drbd/drbd_proc.c
index 2959cdfb77f556e0bed2a8131eb69c69cbfed84f..869bada2ed06838a656d431584afde516a9cd115 100644
(file)
--- a/
drivers/block/drbd/drbd_proc.c
+++ b/
drivers/block/drbd/drbd_proc.c
@@
-52,7
+52,7
@@
void seq_printf_with_thousands_grouping(struct seq_file *seq, long v)
if (unlikely(v >= 1000000)) {
/* cool: > GiByte/s */
seq_printf(seq, "%ld,", v / 1000000);
- v
/
= 1000000;
+ v
%
= 1000000;
seq_printf(seq, "%03ld,%03ld", v/1000, v % 1000);
} else if (likely(v >= 1000))
seq_printf(seq, "%ld,%03ld", v/1000, v % 1000);