History

[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.

Tejun Heo committed 20 years ago

Commit 8ffdc651 parent 641000921 files · +42 −34Browse files

Showing the changes to include/linux/blkdev.h (1 of 21 files). Show all

Unified · Split

include/linux/blkdev.h+3−3
@@ -102,7 +102,7 @@ void copy_io_context(struct io_context **pdst, struct io_context **psrc); · 101 unmodified lines
102void swap_io_context(struct io_context **ioc1, struct io_context **ioc2);102void swap_io_context(struct io_context **ioc1, struct io_context **ioc2);
103 103
104struct request;104struct request;
105typedef void (rq_end_io_fn)(struct request *);105typedef void (rq_end_io_fn)(struct request *, int);
106 106
107struct request_list {107struct request_list {
108 int count[2];108 int count[2];
@@ -560,7 +560,7 @@ extern void register_disk(struct gendisk *dev); · 451 unmodified lines
560extern void generic_make_request(struct bio *bio);560extern void generic_make_request(struct bio *bio);
561extern void blk_put_request(struct request *);561extern void blk_put_request(struct request *);
562extern void __blk_put_request(request_queue_t *, struct request *);562extern void __blk_put_request(request_queue_t *, struct request *);
563extern void blk_end_sync_rq(struct request *rq);563extern void blk_end_sync_rq(struct request *rq, int error);
564extern void blk_attempt_remerge(request_queue_t *, struct request *);564extern void blk_attempt_remerge(request_queue_t *, struct request *);
565extern struct request *blk_get_request(request_queue_t *, int, gfp_t);565extern struct request *blk_get_request(request_queue_t *, int, gfp_t);
566extern void blk_insert_request(request_queue_t *, struct request *, int, void *);566extern 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) · 47 unmodified lines
614 */614 */
615extern int end_that_request_first(struct request *, int, int);615extern int end_that_request_first(struct request *, int, int);
616extern int end_that_request_chunk(struct request *, int, int);616extern int end_that_request_chunk(struct request *, int, int);
617extern void end_that_request_last(struct request *);617extern void end_that_request_last(struct request *, int);
618extern void end_request(struct request *req, int uptodate);618extern void end_request(struct request *req, int uptodate);
619 619
620/*620/*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t