@@ -300,7 +300,6 @@ static const char *const rqf_name[] = {
RQF_NAME(DONTPREP),
RQF_NAME(FAILED),
RQF_NAME(QUIET),
- RQF_NAME(ELVPRIV),
RQF_NAME(IO_STAT),
RQF_NAME(PM),
RQF_NAME(HASHED),
@@ -78,10 +78,9 @@ static inline void blk_mq_sched_completed_request(struct request *rq, u64 now)
static inline void blk_mq_sched_requeue_request(struct request *rq)
{
if (rq->rq_flags & RQF_ELV) {
- struct request_queue *q = rq->q;
- struct elevator_queue *e = q->elevator;
+ struct elevator_queue *e = rq->q->elevator;
- if ((rq->rq_flags & RQF_ELVPRIV) && e->type->ops.requeue_request)
+ if (!op_is_flush(rq->cmd_flags) && e->type->ops.requeue_request)
e->type->ops.requeue_request(rq);
}
}
@@ -369,7 +369,6 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
blk_mq_sched_assign_ioc(rq);
e->type->ops.prepare_request(rq);
- rq->rq_flags |= RQF_ELVPRIV;
}
}
@@ -37,8 +37,6 @@ typedef __u32 __bitwise req_flags_t;
/* don't warn about errors */
#define RQF_QUIET ((__force req_flags_t)(1 << 11))
/* elevator private data attached */
-#define RQF_ELVPRIV ((__force req_flags_t)(1 << 12))
-/* account into disk and partition IO statistics */
#define RQF_IO_STAT ((__force req_flags_t)(1 << 13))
/* runtime pm request */
#define RQF_PM ((__force req_flags_t)(1 << 15))
RQF_ELVPRIV is set for all non-flush requests that have an I/O scheduler with a prepare_request method, and it is checked in a single place where we already know that the request was initialized and has an I/O scheduler. Given that there is no I/O scheduler that has a requeue_request method but not prepare_request method there is no need for this extra flag. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-mq-debugfs.c | 1 - block/blk-mq-sched.h | 5 ++--- block/blk-mq.c | 1 - include/linux/blk-mq.h | 2 -- 4 files changed, 2 insertions(+), 7 deletions(-)