mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
block: move ->make_request_fn to struct block_device_operations
The make_request_fn is a little weird in that it sits directly in struct request_queue instead of an operation vector. Replace it with a block_device_operations method called submit_bio (which describes much better what it does). Also remove the request_queue argument to it, as the queue can be derived pretty trivially from the bio. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
e439ab710f
commit
c62b37d96b
36 changed files with 153 additions and 140 deletions
|
@ -286,8 +286,6 @@ static inline unsigned short req_get_ioprio(struct request *req)
|
|||
|
||||
struct blk_queue_ctx;
|
||||
|
||||
typedef blk_qc_t (make_request_fn) (struct request_queue *q, struct bio *bio);
|
||||
|
||||
struct bio_vec;
|
||||
|
||||
enum blk_eh_timer_return {
|
||||
|
@ -398,8 +396,6 @@ struct request_queue {
|
|||
struct blk_queue_stats *stats;
|
||||
struct rq_qos *rq_qos;
|
||||
|
||||
make_request_fn *make_request_fn;
|
||||
|
||||
const struct blk_mq_ops *mq_ops;
|
||||
|
||||
/* sw queues */
|
||||
|
@ -1162,7 +1158,7 @@ static inline int blk_rq_map_sg(struct request_queue *q, struct request *rq,
|
|||
extern void blk_dump_rq_flags(struct request *, char *);
|
||||
|
||||
bool __must_check blk_get_queue(struct request_queue *);
|
||||
struct request_queue *blk_alloc_queue(make_request_fn make_request, int node_id);
|
||||
struct request_queue *blk_alloc_queue(int node_id);
|
||||
extern void blk_put_queue(struct request_queue *);
|
||||
extern void blk_set_queue_dying(struct request_queue *);
|
||||
|
||||
|
@ -1778,6 +1774,7 @@ static inline void blk_ksm_unregister(struct request_queue *q) { }
|
|||
|
||||
|
||||
struct block_device_operations {
|
||||
blk_qc_t (*submit_bio) (struct bio *bio);
|
||||
int (*open) (struct block_device *, fmode_t);
|
||||
void (*release) (struct gendisk *, fmode_t);
|
||||
int (*rw_page)(struct block_device *, sector_t, struct page *, unsigned int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue