public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH][2.4] Fix negative diskstats
@ 2003-12-30  8:03 Mike Fedyk
  0 siblings, 0 replies; only message in thread
From: Mike Fedyk @ 2003-12-30  8:03 UTC (permalink / raw)
  To: linux-kernel

Hi,

I noticed that my diskstats were reporting negative numbers, and after a
hint from Andreas Dilger I found the problem.

The variables are unsigned int, but they're being reported as signed in proc.

--- drivers/block/genhd.c.orig	2003-12-29 18:35:35.000000000 -0800
+++ drivers/block/genhd.c	2003-12-29 18:40:11.000000000 -0800
@@ -201,7 +201,7 @@
 
 			disk_round_stats(hd);
 			seq_printf(s, "%4d  %4d %10d %s "
-				      "%d %d %d %d %d %d %d %d %d %d %d\n",
+				      "%u %u %u %u %u %u %u %u %u %u %u\n",
 				      gp->major, n, gp->sizes[n],
 				      disk_name(gp, n, buf),
 				      hd->rd_ios, hd->rd_merges,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-30  8:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-30  8:03 [RFC][PATCH][2.4] Fix negative diskstats Mike Fedyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox