diff options
author | Christoph Hellwig <hch@lst.de> | 2015-11-26 03:13:05 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-12-01 12:53:59 -0500 |
commit | 6f3b0e8bcf3cbb87a7459b3ed018d31d918df3f8 (patch) | |
tree | 78520f9313db6743cb1ba6feb805120e80113a8d /block/blk-mq.h | |
parent | d7cf931dd9f18ce8ee7a0a9b7813a19fb2c8f5e9 (diff) |
blk-mq: add a flags parameter to blk_mq_alloc_request
We already have the reserved flag, and a nowait flag awkwardly encoded as
a gfp_t. Add a real flags argument to make the scheme more extensible and
allow for a nicer calling convention.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r-- | block/blk-mq.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h index 713820b47b31..eaede8e45c9c 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h | |||
@@ -96,8 +96,7 @@ static inline void blk_mq_put_ctx(struct blk_mq_ctx *ctx) | |||
96 | struct blk_mq_alloc_data { | 96 | struct blk_mq_alloc_data { |
97 | /* input parameter */ | 97 | /* input parameter */ |
98 | struct request_queue *q; | 98 | struct request_queue *q; |
99 | gfp_t gfp; | 99 | unsigned int flags; |
100 | bool reserved; | ||
101 | 100 | ||
102 | /* input & output parameter */ | 101 | /* input & output parameter */ |
103 | struct blk_mq_ctx *ctx; | 102 | struct blk_mq_ctx *ctx; |
@@ -105,13 +104,11 @@ struct blk_mq_alloc_data { | |||
105 | }; | 104 | }; |
106 | 105 | ||
107 | static inline void blk_mq_set_alloc_data(struct blk_mq_alloc_data *data, | 106 | static inline void blk_mq_set_alloc_data(struct blk_mq_alloc_data *data, |
108 | struct request_queue *q, gfp_t gfp, bool reserved, | 107 | struct request_queue *q, unsigned int flags, |
109 | struct blk_mq_ctx *ctx, | 108 | struct blk_mq_ctx *ctx, struct blk_mq_hw_ctx *hctx) |
110 | struct blk_mq_hw_ctx *hctx) | ||
111 | { | 109 | { |
112 | data->q = q; | 110 | data->q = q; |
113 | data->gfp = gfp; | 111 | data->flags = flags; |
114 | data->reserved = reserved; | ||
115 | data->ctx = ctx; | 112 | data->ctx = ctx; |
116 | data->hctx = hctx; | 113 | data->hctx = hctx; |
117 | } | 114 | } |