lkml.org 
[lkml]   [2000]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectPATCH: /proc/stats for cpqarray in 2.2.14
Date
Hi,

Attached is a patch which adds support for the disk_rio, disk_wio, disk_rblk and
disk_wblk fields in /proc/stat for the Compaq Smart Array controller.

Only having production systems with this controller makes it hard for me to test
it, but the patch is very small and seems correct to me...

Rolf.--- ../new/linux-2.2.14/drivers/block/ll_rw_blk.c Wed Jan 5 00:18:26 2000
+++ linux-2.2.14/drivers/block/ll_rw_blk.c Sun Mar 19 17:19:23 2000
@@ -313,25 +313,31 @@
switch (major) {
case DAC960_MAJOR+0:
disk_index = (minor & 0x00f8) >> 3;
- if (disk_index < 4)
- drive_stat_acct(req->cmd, req->nr_sectors, disk_index);
break;
case SCSI_DISK0_MAJOR:
+ case COMPAQ_SMART2_MAJOR:
+ case COMPAQ_SMART2_MAJOR1:
+ case COMPAQ_SMART2_MAJOR2:
+ case COMPAQ_SMART2_MAJOR3:
+ case COMPAQ_SMART2_MAJOR4:
+ case COMPAQ_SMART2_MAJOR5:
+ case COMPAQ_SMART2_MAJOR6:
+ case COMPAQ_SMART2_MAJOR7:
disk_index = (minor & 0x00f0) >> 4;
- if (disk_index < 4)
- drive_stat_acct(req->cmd, req->nr_sectors, disk_index);
break;
case IDE0_MAJOR: /* same as HD_MAJOR */
case XT_DISK_MAJOR:
disk_index = (minor & 0x0040) >> 6;
- drive_stat_acct(req->cmd, req->nr_sectors, disk_index);
break;
case IDE1_MAJOR:
disk_index = ((minor & 0x0040) >> 6) + 2;
- drive_stat_acct(req->cmd, req->nr_sectors, disk_index);
+ break;
default:
+ disk_index = -1;
break;
}
+ if (disk_index >= 0 && disk_index < 4)
+ drive_stat_acct(req->cmd, req->nr_sectors, disk_index);

req->next = NULL;
\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.195 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site