linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 12/30] blk_end_request: changing ub (take 4)
@ 2007-12-11 22:46 Kiyoshi Ueda
  2007-12-11 23:48 ` Pete Zaitcev
  0 siblings, 1 reply; 6+ messages in thread
From: Kiyoshi Ueda @ 2007-12-11 22:46 UTC (permalink / raw)
  To: jens.axboe
  Cc: linux-kernel, linux-scsi, linux-ide, dm-devel, j-nomura, k-ueda, zaitcev

This patch converts ub to use blk_end_request interfaces.
Related 'uptodate' arguments are converted to 'error'.

Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
---
 drivers/block/ub.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Index: 2.6.24-rc4/drivers/block/ub.c
===================================================================
--- 2.6.24-rc4.orig/drivers/block/ub.c
+++ 2.6.24-rc4/drivers/block/ub.c
@@ -808,16 +808,16 @@ static void ub_rw_cmd_done(struct ub_dev
 
 static void ub_end_rq(struct request *rq, unsigned int scsi_status)
 {
-	int uptodate;
+	int error;
 
 	if (scsi_status == 0) {
-		uptodate = 1;
+		error = 0;
 	} else {
-		uptodate = 0;
+		error = -EIO;
 		rq->errors = scsi_status;
 	}
-	end_that_request_first(rq, uptodate, rq->hard_nr_sectors);
-	end_that_request_last(rq, uptodate);
+	if (__blk_end_request(rq, error, blk_rq_bytes(rq)))
+		BUG();
 }
 
 static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-12-14 19:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-11 22:46 [PATCH 12/30] blk_end_request: changing ub (take 4) Kiyoshi Ueda
2007-12-11 23:48 ` Pete Zaitcev
2007-12-12 20:38   ` Kiyoshi Ueda
2007-12-13 21:59     ` Pete Zaitcev
2007-12-14 17:04       ` Kiyoshi Ueda
2007-12-14 19:49         ` Pete Zaitcev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).