diff options
author | Tejun Heo <htejun@gmail.com> | 2006-01-06 03:49:03 -0500 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2006-01-06 03:49:03 -0500 |
commit | 8ffdc6550c47f75ca4e6c9f30a2a89063e035cf2 (patch) | |
tree | a478b9acef5c66242a964154f7ad3a0ea750ef0f /drivers/block | |
parent | 64100099ed22f71cce656c5c2caecf5c9cf255dc (diff) |
[BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn()
add @uptodate argument to end_that_request_last() and @error
to rq_end_io_fn(). there's no generic way to pass error code
to request completion function, making generic error handling
of non-fs request difficult (rq->errors is driver-specific and
each driver uses it differently). this patch adds @uptodate
to end_that_request_last() and @error to rq_end_io_fn().
for fs requests, this doesn't really matter, so just using the
same uptodate argument used in the last call to
end_that_request_first() should suffice. imho, this can also
help the generic command-carrying request jens is working on.
Signed-off-by: tejun heo <htejun@gmail.com>
Signed-Off-By: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/DAC960.c | 2 | ||||
-rw-r--r-- | drivers/block/cciss.c | 2 | ||||
-rw-r--r-- | drivers/block/cpqarray.c | 2 | ||||
-rw-r--r-- | drivers/block/floppy.c | 2 | ||||
-rw-r--r-- | drivers/block/nbd.c | 2 | ||||
-rw-r--r-- | drivers/block/sx8.c | 2 | ||||
-rw-r--r-- | drivers/block/ub.c | 2 | ||||
-rw-r--r-- | drivers/block/viodasd.c | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 70eaa5c7ac08..21097a39a057 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -3471,7 +3471,7 @@ static inline boolean DAC960_ProcessCompletedRequest(DAC960_Command_T *Command, | |||
3471 | 3471 | ||
3472 | if (!end_that_request_first(Request, UpToDate, Command->BlockCount)) { | 3472 | if (!end_that_request_first(Request, UpToDate, Command->BlockCount)) { |
3473 | 3473 | ||
3474 | end_that_request_last(Request); | 3474 | end_that_request_last(Request, UpToDate); |
3475 | 3475 | ||
3476 | if (Command->Completion) { | 3476 | if (Command->Completion) { |
3477 | complete(Command->Completion); | 3477 | complete(Command->Completion); |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index c3441b3f086e..d2815b7a9150 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -2310,7 +2310,7 @@ static inline void complete_command( ctlr_info_t *h, CommandList_struct *cmd, | |||
2310 | printk("Done with %p\n", cmd->rq); | 2310 | printk("Done with %p\n", cmd->rq); |
2311 | #endif /* CCISS_DEBUG */ | 2311 | #endif /* CCISS_DEBUG */ |
2312 | 2312 | ||
2313 | end_that_request_last(cmd->rq); | 2313 | end_that_request_last(cmd->rq, status ? 1 : -EIO); |
2314 | cmd_free(h,cmd,1); | 2314 | cmd_free(h,cmd,1); |
2315 | } | 2315 | } |
2316 | 2316 | ||
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index cf1822a6361c..9bddb6874873 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c | |||
@@ -1036,7 +1036,7 @@ static inline void complete_command(cmdlist_t *cmd, int timeout) | |||
1036 | complete_buffers(cmd->rq->bio, ok); | 1036 | complete_buffers(cmd->rq->bio, ok); |
1037 | 1037 | ||
1038 | DBGPX(printk("Done with %p\n", cmd->rq);); | 1038 | DBGPX(printk("Done with %p\n", cmd->rq);); |
1039 | end_that_request_last(cmd->rq); | 1039 | end_that_request_last(cmd->rq, ok ? 1 : -EIO); |
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | /* | 1042 | /* |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index f7e765a1d313..a5b857c5c4b8 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -2301,7 +2301,7 @@ static void floppy_end_request(struct request *req, int uptodate) | |||
2301 | add_disk_randomness(req->rq_disk); | 2301 | add_disk_randomness(req->rq_disk); |
2302 | floppy_off((long)req->rq_disk->private_data); | 2302 | floppy_off((long)req->rq_disk->private_data); |
2303 | blkdev_dequeue_request(req); | 2303 | blkdev_dequeue_request(req); |
2304 | end_that_request_last(req); | 2304 | end_that_request_last(req, uptodate); |
2305 | 2305 | ||
2306 | /* We're done with the request */ | 2306 | /* We're done with the request */ |
2307 | current_req = NULL; | 2307 | current_req = NULL; |
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 9e268ddedfbd..485345c8e632 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -136,7 +136,7 @@ static void nbd_end_request(struct request *req) | |||
136 | 136 | ||
137 | spin_lock_irqsave(q->queue_lock, flags); | 137 | spin_lock_irqsave(q->queue_lock, flags); |
138 | if (!end_that_request_first(req, uptodate, req->nr_sectors)) { | 138 | if (!end_that_request_first(req, uptodate, req->nr_sectors)) { |
139 | end_that_request_last(req); | 139 | end_that_request_last(req, uptodate); |
140 | } | 140 | } |
141 | spin_unlock_irqrestore(q->queue_lock, flags); | 141 | spin_unlock_irqrestore(q->queue_lock, flags); |
142 | } | 142 | } |
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index 1ded3b433459..9251f4131b53 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c | |||
@@ -770,7 +770,7 @@ static inline void carm_end_request_queued(struct carm_host *host, | |||
770 | rc = end_that_request_first(req, uptodate, req->hard_nr_sectors); | 770 | rc = end_that_request_first(req, uptodate, req->hard_nr_sectors); |
771 | assert(rc == 0); | 771 | assert(rc == 0); |
772 | 772 | ||
773 | end_that_request_last(req); | 773 | end_that_request_last(req, uptodate); |
774 | 774 | ||
775 | rc = carm_put_request(host, crq); | 775 | rc = carm_put_request(host, crq); |
776 | assert(rc == 0); | 776 | assert(rc == 0); |
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 10740a065088..a05fe5843e6c 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -951,7 +951,7 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd) | |||
951 | static void ub_end_rq(struct request *rq, int uptodate) | 951 | static void ub_end_rq(struct request *rq, int uptodate) |
952 | { | 952 | { |
953 | end_that_request_first(rq, uptodate, rq->hard_nr_sectors); | 953 | end_that_request_first(rq, uptodate, rq->hard_nr_sectors); |
954 | end_that_request_last(rq); | 954 | end_that_request_last(rq, uptodate); |
955 | } | 955 | } |
956 | 956 | ||
957 | static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, | 957 | static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, |
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index 2d518aa2720a..063f0304a163 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c | |||
@@ -305,7 +305,7 @@ static void viodasd_end_request(struct request *req, int uptodate, | |||
305 | if (end_that_request_first(req, uptodate, num_sectors)) | 305 | if (end_that_request_first(req, uptodate, num_sectors)) |
306 | return; | 306 | return; |
307 | add_disk_randomness(req->rq_disk); | 307 | add_disk_randomness(req->rq_disk); |
308 | end_that_request_last(req); | 308 | end_that_request_last(req, uptodate); |
309 | } | 309 | } |
310 | 310 | ||
311 | /* | 311 | /* |