aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-01-10 03:44:39 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:37:07 -0500
commit4ff57935ad0f1620269f4b08e8acfda619cc5e4b (patch)
tree70859628e9c59e0495351891b17f537967d1662d /drivers/ide/ide-io.c
parentc8d52465f95c4187871f8e65666c07806ca06d41 (diff)
[PATCH] ide: preserve errors for failed requests
To preserve the ->errors values for requests that failed, use the normal completion path for that. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index dea2d4dcc698..bcbaeb50bb93 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -60,10 +60,10 @@ void ide_softirq_done(struct request *rq)
60 request_queue_t *q = rq->q; 60 request_queue_t *q = rq->q;
61 61
62 add_disk_randomness(rq->rq_disk); 62 add_disk_randomness(rq->rq_disk);
63 end_that_request_chunk(rq, rq->errors, rq->data_len); 63 end_that_request_chunk(rq, 1, rq->data_len);
64 64
65 spin_lock_irq(q->queue_lock); 65 spin_lock_irq(q->queue_lock);
66 end_that_request_last(rq, rq->errors); 66 end_that_request_last(rq, 1);
67 spin_unlock_irq(q->queue_lock); 67 spin_unlock_irq(q->queue_lock);
68} 68}
69 69
@@ -96,11 +96,12 @@ int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate,
96 96
97 /* 97 /*
98 * For partial completions (or non fs/pc requests), use the regular 98 * For partial completions (or non fs/pc requests), use the regular
99 * direct completion path. 99 * direct completion path. Same thing for requests that failed, to
100 * preserve the ->errors value we use the normal completion path
101 * for those
100 */ 102 */
101 nbytes = nr_sectors << 9; 103 nbytes = nr_sectors << 9;
102 if (rq_all_done(rq, nbytes)) { 104 if (!rq->errors && rq_all_done(rq, nbytes)) {
103 rq->errors = uptodate;
104 rq->data_len = nbytes; 105 rq->data_len = nbytes;
105 blkdev_dequeue_request(rq); 106 blkdev_dequeue_request(rq);
106 HWGROUP(drive)->rq = NULL; 107 HWGROUP(drive)->rq = NULL;