lkml.org 
[lkml]   [2003]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC][PATCH][2.4] Fix negative diskstats
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,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.032 / U:1.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site