From: "Mike Miller (OS Dev)" <mikem@beardog.cca.cpqcorp.net>
To: akpm@osdl.org, jens.axboe@oracle.com
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH 12/12] cciss: fix for iostat
Date: Mon, 6 Nov 2006 14:32:05 -0600 [thread overview]
Message-ID: <20061106203205.GL17847@beardog.cca.cpqcorp.net> (raw)
Patch 12 of 12
This patch replaces complete_buffers with end_that_request_first to fix
programs like iostat. This has been broken for the last few kernel releases.
Please consider this for inclusion.
Thanks,
mikem
Signed-off-by: Mike Miller <mike.miller@hp.com>
---
---
drivers/block/cciss.c | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
diff -puN drivers/block/cciss.c~cciss_update_diskstats_fix drivers/block/cciss.c
--- linux-2.6/drivers/block/cciss.c~cciss_update_diskstats_fix 2006-11-06 13:28:53.000000000 -0600
+++ linux-2.6-root/drivers/block/cciss.c 2006-11-06 13:28:53.000000000 -0600
@@ -1156,18 +1156,6 @@ static int cciss_ioctl(struct inode *ino
}
}
-static inline void complete_buffers(struct bio *bio, int status)
-{
- while (bio) {
- struct bio *xbh = bio->bi_next;
- int nr_sectors = bio_sectors(bio);
-
- bio->bi_next = NULL;
- bio_endio(bio, nr_sectors << 9, status ? 0 : -EIO);
- bio = xbh;
- }
-}
-
static void cciss_check_queues(ctlr_info_t *h)
{
int start_queue = h->next_to_run;
@@ -1236,15 +1224,15 @@ static void cciss_softirq_done(struct re
pci_unmap_page(h->pdev, temp64.val, cmd->SG[i].Len, ddir);
}
- complete_buffers(rq->bio, rq->errors);
-
#ifdef CCISS_DEBUG
printk("Done with %p\n", rq);
#endif /* CCISS_DEBUG */
- add_disk_randomness(rq->rq_disk);
spin_lock_irqsave(&h->lock, flags);
- end_that_request_last(rq, rq->errors);
+ if (!end_that_request_first(rq, rq->errors, rq->nr_sectors)) {
+ add_disk_randomness(rq->rq_disk);
+ end_that_request_last(rq, rq->errors);
+ }
cmd_free(h, cmd, 1);
cciss_check_queues(h);
spin_unlock_irqrestore(&h->lock, flags);
_
next reply other threads:[~2006-11-06 20:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-06 20:32 Mike Miller (OS Dev) [this message]
2006-11-06 20:45 ` [PATCH 12/12] cciss: fix for iostat Jens Axboe
2006-11-06 21:05 ` Jens Axboe
2006-11-07 19:24 ` Mike Miller (OS Dev)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061106203205.GL17847@beardog.cca.cpqcorp.net \
--to=mikem@beardog.cca.cpqcorp.net \
--cc=akpm@osdl.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox