diff options
author | Kiyoshi Ueda <k-ueda@ct.jp.nec.com> | 2007-12-11 17:45:04 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-01-28 04:36:40 -0500 |
commit | 5047c3c64eb4787b9a2d80a2003d9edded41f560 (patch) | |
tree | 4e900640ca99437a689a71f1abe9aa50e61b9f53 /drivers | |
parent | f01ab252cbfc039e4f16db9aed272d11d13525d1 (diff) |
blk_end_request: changing sunvdc (take 4)
This patch converts sunvdc to use blk_end_request interfaces.
Related 'uptodate' arguments are converted to 'error'.
As a result, the interface of internal function, vdc_end_request(),
is changed.
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/sunvdc.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c index fac4c6cd04f..66e30155b0a 100644 --- a/drivers/block/sunvdc.c +++ b/drivers/block/sunvdc.c | |||
@@ -212,12 +212,9 @@ static void vdc_end_special(struct vdc_port *port, struct vio_disk_desc *desc) | |||
212 | vdc_finish(&port->vio, -err, WAITING_FOR_GEN_CMD); | 212 | vdc_finish(&port->vio, -err, WAITING_FOR_GEN_CMD); |
213 | } | 213 | } |
214 | 214 | ||
215 | static void vdc_end_request(struct request *req, int uptodate, int num_sectors) | 215 | static void vdc_end_request(struct request *req, int error, int num_sectors) |
216 | { | 216 | { |
217 | if (end_that_request_first(req, uptodate, num_sectors)) | 217 | __blk_end_request(req, error, num_sectors << 9); |
218 | return; | ||
219 | add_disk_randomness(req->rq_disk); | ||
220 | end_that_request_last(req, uptodate); | ||
221 | } | 218 | } |
222 | 219 | ||
223 | static void vdc_end_one(struct vdc_port *port, struct vio_dring_state *dr, | 220 | static void vdc_end_one(struct vdc_port *port, struct vio_dring_state *dr, |
@@ -242,7 +239,7 @@ static void vdc_end_one(struct vdc_port *port, struct vio_dring_state *dr, | |||
242 | 239 | ||
243 | rqe->req = NULL; | 240 | rqe->req = NULL; |
244 | 241 | ||
245 | vdc_end_request(req, !desc->status, desc->size >> 9); | 242 | vdc_end_request(req, (desc->status ? -EIO : 0), desc->size >> 9); |
246 | 243 | ||
247 | if (blk_queue_stopped(port->disk->queue)) | 244 | if (blk_queue_stopped(port->disk->queue)) |
248 | blk_start_queue(port->disk->queue); | 245 | blk_start_queue(port->disk->queue); |
@@ -456,7 +453,7 @@ static void do_vdc_request(struct request_queue *q) | |||
456 | 453 | ||
457 | blkdev_dequeue_request(req); | 454 | blkdev_dequeue_request(req); |
458 | if (__send_request(req) < 0) | 455 | if (__send_request(req) < 0) |
459 | vdc_end_request(req, 0, req->hard_nr_sectors); | 456 | vdc_end_request(req, -EIO, req->hard_nr_sectors); |
460 | } | 457 | } |
461 | } | 458 | } |
462 | 459 | ||