diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2006-12-04 14:29:45 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-12-04 14:29:45 +0100 |
commit | f131f70efa075828d573d1200abb8ebe3d8997f0 (patch) | |
tree | 6ae2d398d17d2d67d873284a6edd963bccd45831 | |
parent | 6d46c48302238d397a6ebf055983aa09fac3b6b1 (diff) | |
download | lwn-f131f70efa075828d573d1200abb8ebe3d8997f0.tar.gz lwn-f131f70efa075828d573d1200abb8ebe3d8997f0.zip |
cpqarray: fix iostat
cpqarray needs to call disk_stat_add() for iostat to work.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r-- | drivers/block/cpqarray.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 862b9abac0ae..f484d87865e2 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c @@ -1004,6 +1004,7 @@ static inline void complete_buffers(struct bio *bio, int ok) */ static inline void complete_command(cmdlist_t *cmd, int timeout) { + struct request *rq = cmd->rq; int ok=1; int i, ddir; @@ -1035,10 +1036,16 @@ static inline void complete_command(cmdlist_t *cmd, int timeout) pci_unmap_page(hba[cmd->ctlr]->pci_dev, cmd->req.sg[i].addr, cmd->req.sg[i].size, ddir); - complete_buffers(cmd->rq->bio, ok); + complete_buffers(rq->bio, ok); - DBGPX(printk("Done with %p\n", cmd->rq);); - end_that_request_last(cmd->rq, ok ? 1 : -EIO); + if (blk_fs_request(rq)) { + const int rw = rq_data_dir(rq); + + disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors); + } + + DBGPX(printk("Done with %p\n", rq);); + end_that_request_last(rq, ok ? 1 : -EIO); } /* |