Commit 15b391fe authored by Jens Axboe's avatar Jens Axboe Committed by Chris Wright

[PATCH] cpqarray: fix iostat

cpqarray needs to call disk_stat_add() for iostat to work.
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent ad9c0831
...@@ -1000,6 +1000,7 @@ static inline void complete_buffers(struct bio *bio, int ok) ...@@ -1000,6 +1000,7 @@ static inline void complete_buffers(struct bio *bio, int ok)
*/ */
static inline void complete_command(cmdlist_t *cmd, int timeout) static inline void complete_command(cmdlist_t *cmd, int timeout)
{ {
struct request *rq = cmd->rq;
int ok=1; int ok=1;
int i, ddir; int i, ddir;
...@@ -1031,12 +1032,18 @@ static inline void complete_command(cmdlist_t *cmd, int timeout) ...@@ -1031,12 +1032,18 @@ static inline void complete_command(cmdlist_t *cmd, int timeout)
pci_unmap_page(hba[cmd->ctlr]->pci_dev, cmd->req.sg[i].addr, pci_unmap_page(hba[cmd->ctlr]->pci_dev, cmd->req.sg[i].addr,
cmd->req.sg[i].size, ddir); cmd->req.sg[i].size, ddir);
complete_buffers(cmd->rq->bio, ok); complete_buffers(rq->bio, ok);
add_disk_randomness(cmd->rq->rq_disk); if (blk_fs_request(rq)) {
const int rw = rq_data_dir(rq);
DBGPX(printk("Done with %p\n", cmd->rq);); disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors);
end_that_request_last(cmd->rq, ok ? 1 : -EIO); }
add_disk_randomness(rq->rq_disk);
DBGPX(printk("Done with %p\n", rq););
end_that_request_last(rq, ok ? 1 : -EIO);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment