mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-16 11:32:41 +00:00
[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>
This commit is contained in:
parent
64100099ed
commit
8ffdc6550c
21 changed files with 42 additions and 34 deletions
|
@ -102,7 +102,7 @@ void copy_io_context(struct io_context **pdst, struct io_context **psrc);
|
|||
void swap_io_context(struct io_context **ioc1, struct io_context **ioc2);
|
||||
|
||||
struct request;
|
||||
typedef void (rq_end_io_fn)(struct request *);
|
||||
typedef void (rq_end_io_fn)(struct request *, int);
|
||||
|
||||
struct request_list {
|
||||
int count[2];
|
||||
|
@ -560,7 +560,7 @@ extern void register_disk(struct gendisk *dev);
|
|||
extern void generic_make_request(struct bio *bio);
|
||||
extern void blk_put_request(struct request *);
|
||||
extern void __blk_put_request(request_queue_t *, struct request *);
|
||||
extern void blk_end_sync_rq(struct request *rq);
|
||||
extern void blk_end_sync_rq(struct request *rq, int error);
|
||||
extern void blk_attempt_remerge(request_queue_t *, struct request *);
|
||||
extern struct request *blk_get_request(request_queue_t *, int, gfp_t);
|
||||
extern void blk_insert_request(request_queue_t *, struct request *, int, void *);
|
||||
|
@ -614,7 +614,7 @@ static inline void blk_run_address_space(struct address_space *mapping)
|
|||
*/
|
||||
extern int end_that_request_first(struct request *, int, int);
|
||||
extern int end_that_request_chunk(struct request *, int, int);
|
||||
extern void end_that_request_last(struct request *);
|
||||
extern void end_that_request_last(struct request *, int);
|
||||
extern void end_request(struct request *req, int uptodate);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue