Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77621
b: refs/heads/master
c: 4c4e214
h: refs/heads/master
i:
  77619: 5d837fd
v: v3
  • Loading branch information
Kiyoshi Ueda authored and Jens Axboe committed Jan 28, 2008
1 parent 6a20f1e commit 12d7e82
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd539832c7d3a242269374dbcae2cd54da150930
refs/heads/master: 4c4e21486154c8db93c7e82a4b3ab5f621cd1d97
17 changes: 9 additions & 8 deletions trunk/drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1595,12 +1595,10 @@ void dasd_block_clear_timer(struct dasd_block *block)
/*
* posts the buffer_cache about a finalized request
*/
static inline void dasd_end_request(struct request *req, int uptodate)
static inline void dasd_end_request(struct request *req, int error)
{
if (end_that_request_first(req, uptodate, req->hard_nr_sectors))
if (__blk_end_request(req, error, blk_rq_bytes(req)))
BUG();
add_disk_randomness(req->rq_disk);
end_that_request_last(req, uptodate);
}

/*
Expand Down Expand Up @@ -1657,7 +1655,7 @@ static void __dasd_process_request_queue(struct dasd_block *block)
"Rejecting write request %p",
req);
blkdev_dequeue_request(req);
dasd_end_request(req, 0);
dasd_end_request(req, -EIO);
continue;
}
cqr = basedev->discipline->build_cp(basedev, block, req);
Expand Down Expand Up @@ -1686,7 +1684,7 @@ static void __dasd_process_request_queue(struct dasd_block *block)
"on request %p",
PTR_ERR(cqr), req);
blkdev_dequeue_request(req);
dasd_end_request(req, 0);
dasd_end_request(req, -EIO);
continue;
}
/*
Expand All @@ -1705,11 +1703,14 @@ static void __dasd_cleanup_cqr(struct dasd_ccw_req *cqr)
{
struct request *req;
int status;
int error = 0;

req = (struct request *) cqr->callback_data;
dasd_profile_end(cqr->block, cqr, req);
status = cqr->memdev->discipline->free_cp(cqr, req);
dasd_end_request(req, status);
if (status <= 0)
error = status ? status : -EIO;
dasd_end_request(req, error);
}

/*
Expand Down Expand Up @@ -2009,7 +2010,7 @@ static void dasd_flush_request_queue(struct dasd_block *block)
spin_lock_irq(&block->request_queue_lock);
while ((req = elv_next_request(block->request_queue))) {
blkdev_dequeue_request(req);
dasd_end_request(req, 0);
dasd_end_request(req, -EIO);
}
spin_unlock_irq(&block->request_queue_lock);
}
Expand Down
13 changes: 6 additions & 7 deletions trunk/drivers/s390/char/tape_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ tapeblock_trigger_requeue(struct tape_device *device)
* Post finished request.
*/
static void
tapeblock_end_request(struct request *req, int uptodate)
tapeblock_end_request(struct request *req, int error)
{
if (end_that_request_first(req, uptodate, req->hard_nr_sectors))
if (__blk_end_request(req, error, blk_rq_bytes(req)))
BUG();
end_that_request_last(req, uptodate);
}

static void
Expand All @@ -91,7 +90,7 @@ __tapeblock_end_request(struct tape_request *ccw_req, void *data)

device = ccw_req->device;
req = (struct request *) data;
tapeblock_end_request(req, ccw_req->rc == 0);
tapeblock_end_request(req, (ccw_req->rc == 0) ? 0 : -EIO);
if (ccw_req->rc == 0)
/* Update position. */
device->blk_data.block_position =
Expand Down Expand Up @@ -119,7 +118,7 @@ tapeblock_start_request(struct tape_device *device, struct request *req)
ccw_req = device->discipline->bread(device, req);
if (IS_ERR(ccw_req)) {
DBF_EVENT(1, "TBLOCK: bread failed\n");
tapeblock_end_request(req, 0);
tapeblock_end_request(req, -EIO);
return PTR_ERR(ccw_req);
}
ccw_req->callback = __tapeblock_end_request;
Expand All @@ -132,7 +131,7 @@ tapeblock_start_request(struct tape_device *device, struct request *req)
* Start/enqueueing failed. No retries in
* this case.
*/
tapeblock_end_request(req, 0);
tapeblock_end_request(req, -EIO);
device->discipline->free_bread(ccw_req);
}

Expand Down Expand Up @@ -177,7 +176,7 @@ tapeblock_requeue(struct work_struct *work) {
if (rq_data_dir(req) == WRITE) {
DBF_EVENT(1, "TBLOCK: Rejecting write request\n");
blkdev_dequeue_request(req);
tapeblock_end_request(req, 0);
tapeblock_end_request(req, -EIO);
continue;
}
spin_unlock_irq(&device->blk_data.request_queue_lock);
Expand Down

0 comments on commit 12d7e82

Please sign in to comment.