Skip to content

Commit

Permalink
blk_end_request: changing sunvdc (take 4)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kiyoshi Ueda authored and Jens Axboe committed Jan 28, 2008
1 parent f01ab25 commit 5047c3c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions drivers/block/sunvdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,9 @@ static void vdc_end_special(struct vdc_port *port, struct vio_disk_desc *desc)
vdc_finish(&port->vio, -err, WAITING_FOR_GEN_CMD);
}

static void vdc_end_request(struct request *req, int uptodate, int num_sectors)
static void vdc_end_request(struct request *req, int error, int num_sectors)
{
if (end_that_request_first(req, uptodate, num_sectors))
return;
add_disk_randomness(req->rq_disk);
end_that_request_last(req, uptodate);
__blk_end_request(req, error, num_sectors << 9);
}

static void vdc_end_one(struct vdc_port *port, struct vio_dring_state *dr,
Expand All @@ -242,7 +239,7 @@ static void vdc_end_one(struct vdc_port *port, struct vio_dring_state *dr,

rqe->req = NULL;

vdc_end_request(req, !desc->status, desc->size >> 9);
vdc_end_request(req, (desc->status ? -EIO : 0), desc->size >> 9);

if (blk_queue_stopped(port->disk->queue))
blk_start_queue(port->disk->queue);
Expand Down Expand Up @@ -456,7 +453,7 @@ static void do_vdc_request(struct request_queue *q)

blkdev_dequeue_request(req);
if (__send_request(req) < 0)
vdc_end_request(req, 0, req->hard_nr_sectors);
vdc_end_request(req, -EIO, req->hard_nr_sectors);
}
}

Expand Down

0 comments on commit 5047c3c

Please sign in to comment.