diff options
author | Kiyoshi Ueda <k-ueda@ct.jp.nec.com> | 2007-12-11 22:51:46 (GMT) |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-01-28 09:37:08 (GMT) |
commit | e3a04fe34a3ec81ddeddb6c73fb7299716cffbb0 (patch) | |
tree | 080d1ec1cc3d78b3aef4e95f5334f5b4c3da3498 /include/linux/blkdev.h | |
parent | aaa04c28cb9a1efd42541fdb7ab648231c2a2263 (diff) | |
download | linux-fsl-qoriq-e3a04fe34a3ec81ddeddb6c73fb7299716cffbb0.tar.xz |
blk_end_request: add bidi completion interface (take 4)
This patch adds a variant of the interface, blk_end_bidi_request(),
which completes a bidi request.
Bidi request must be completed as a whole, both rq and rq->next_rq
at once. So the interface has 2 arguments for completion size.
As for ->end_io, only rq->end_io is called (rq->next_rq->end_io is not
called). So if special completion handling is needed, the handler
must be set to rq->end_io.
And the handler must take care of freeing next_rq too, since
the interface doesn't care of it if rq->end_io is not NULL.
Cc: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 63fe754..029b709 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -728,6 +728,8 @@ static inline void blk_run_address_space(struct address_space *mapping) */ extern int blk_end_request(struct request *rq, int error, int nr_bytes); extern int __blk_end_request(struct request *rq, int error, int nr_bytes); +extern int blk_end_bidi_request(struct request *rq, int error, int nr_bytes, + int bidi_bytes); 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 *, int); |