diff options
| author | Christoph Hellwig <hch@lst.de> | 2003-05-03 22:13:40 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-05-03 22:13:40 -0700 |
| commit | 9cfeede46b1966b67c2e0a5ec65059cdb886e5dc (patch) | |
| tree | 619c20fd5ddccbe670ece7027138f0ed490e3aed /include/linux/blkdev.h | |
| parent | 48ff4dace6bfcc64fedbd8e03597c5e5dc7823ec (diff) | |
[PATCH] make <linux/blk.h> obsolete
This file was _the_ header for block-device related stuff in earlier
Linux versions, but nowdays there's just a few prototypes left that
really belong into blkdev.h or genhd.h (and in one case elevator.h).
This patch moves them over and removes everything but including
blkdev.h from blk.h Note that blkdev.h gets all the headers that
were included in blk.h inmplicitly too. Now we can start removing
all references to it an maybe kill it off before 2.6. *sniff*
Diffstat (limited to 'include/linux/blkdev.h')
| -rw-r--r-- | include/linux/blkdev.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 3899acc8a4f1..32a8cddd2ca3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -349,6 +349,30 @@ static inline request_queue_t *bdev_get_queue(struct block_device *bdev) } /* + * end_request() and friends. Must be called with the request queue spinlock + * acquired. All functions called within end_request() _must_be_ atomic. + * + * Several drivers define their own end_request and call + * end_that_request_first() and end_that_request_last() + * for parts of the original function. This prevents + * code duplication in drivers. + */ +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_request(struct request *req, int uptodate); + +static inline void blkdev_dequeue_request(struct request *req) +{ + BUG_ON(list_empty(&req->queuelist)); + + list_del_init(&req->queuelist); + + if (req->q) + elv_remove_request(req->q, req); +} + +/* * get ready for proper ref counting */ #define blk_put_queue(q) do { } while (0) |
