Messages in this thread Patch in this message | | | From | Rolf Fokkens <> | Subject | PATCH: /proc/stats for cpqarray in 2.2.14 | Date | Sun, 19 Mar 2000 17:24:18 +0100 |
| |
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; | |