History

scsi: block: Remove RQF_PREEMPT and BLK_MQ_REQ_PREEMPT

Remove flag RQF_PREEMPT and BLK_MQ_REQ_PREEMPT since these are no longer used by any kernel code.

Bart Van Assche committed 5 years ago

Commit a4d34da1 parent e6044f75 files · +4 −14Browse files

Unified · Split

5 files
  1. block/blk-core.c +3 −4
  2. block/blk-mq-debugfs.c +0 −1
  3. block/blk-mq.c +0 −2
  4. include/linux/blk-mq.h +0 −2
  5. include/linux/blkdev.h +1 −5
block/blk-core.c+3−4
@@ -424,11 +424,11 @@ EXPORT_SYMBOL(blk_cleanup_queue); · 423 unmodified lines
424424 /**
425425 * blk_queue_enter() - try to increase q->q_usage_counter
426426 * @q: request queue pointer
427− * @flags: BLK_MQ_REQ_NOWAIT, BLK_MQ_REQ_PM and/or BLK_MQ_REQ_PREEMPT
427+ * @flags: BLK_MQ_REQ_NOWAIT and/or BLK_MQ_REQ_PM
428428 */
429429 int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags)
430430 {
431− const bool pm = flags & (BLK_MQ_REQ_PM | BLK_MQ_REQ_PREEMPT);
431+ const bool pm = flags & BLK_MQ_REQ_PM;
432432
433433 while (true) {
434434 bool success = false;
@@ -630,8 +630,7 @@ struct request *blk_get_request(struct request_queue *q, unsigned int op, · 195 unmodified lines
630630 struct request *req;
631631
632632 WARN_ON_ONCE(op & REQ_NOWAIT);
633− WARN_ON_ONCE(flags & ~(BLK_MQ_REQ_NOWAIT | BLK_MQ_REQ_PM |
634− BLK_MQ_REQ_PREEMPT));
633+ WARN_ON_ONCE(flags & ~(BLK_MQ_REQ_NOWAIT | BLK_MQ_REQ_PM));
635634
636635 req = blk_mq_alloc_request(q, op, flags);
637636 if (!IS_ERR(req) && q->mq_ops->initialize_rq_fn)
block/blk-mq-debugfs.c+0−1
@@ -297,7 +297,6 @@ static const char *const rqf_name[] = { · 296 unmodified lines
297297 RQF_NAME(MIXED_MERGE),
298298 RQF_NAME(MQ_INFLIGHT),
299299 RQF_NAME(DONTPREP),
300− RQF_NAME(PREEMPT),
301300 RQF_NAME(FAILED),
302301 RQF_NAME(QUIET),
303302 RQF_NAME(ELVPRIV),
block/blk-mq.c+0−2
@@ -294,8 +294,6 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data, · 293 unmodified lines
294294 rq->cmd_flags = data->cmd_flags;
295295 if (data->flags & BLK_MQ_REQ_PM)
296296 rq->rq_flags |= RQF_PM;
297− if (data->flags & BLK_MQ_REQ_PREEMPT)
298− rq->rq_flags |= RQF_PREEMPT;
299297 if (blk_queue_io_stat(data->q))
300298 rq->rq_flags |= RQF_IO_STAT;
301299 INIT_LIST_HEAD(&rq->queuelist);
include/linux/blk-mq.h+0−2
@@ -446,8 +446,6 @@ enum { · 445 unmodified lines
446446 BLK_MQ_REQ_RESERVED = (__force blk_mq_req_flags_t)(1 << 1),
447447 /* set RQF_PM */
448448 BLK_MQ_REQ_PM = (__force blk_mq_req_flags_t)(1 << 2),
449− /* set RQF_PREEMPT */
450− BLK_MQ_REQ_PREEMPT = (__force blk_mq_req_flags_t)(1 << 3),
451449 };
452450
453451 struct request *blk_mq_alloc_request(struct request_queue *q, unsigned int op,
include/linux/blkdev.h+1−5
@@ -79,9 +79,6 @@ typedef __u32 __bitwise req_flags_t; · 78 unmodified lines
7979 #define RQF_MQ_INFLIGHT ((__force req_flags_t)(1 << 6))
8080 /* don't call prep for this one */
8181 #define RQF_DONTPREP ((__force req_flags_t)(1 << 7))
82−/* set for "ide_preempt" requests and also for requests for which the SCSI
83− "quiesce" state must be ignored. */
84−#define RQF_PREEMPT ((__force req_flags_t)(1 << 8))
8582 /* vaguely specified driver internal error. Ignored by the block layer */
8683 #define RQF_FAILED ((__force req_flags_t)(1 << 10))
8784 /* don't warn about errors */
@@ -430,8 +427,7 @@ struct request_queue { · 342 unmodified lines
430427 unsigned long queue_flags;
431428 /*
432429 * Number of contexts that have called blk_set_pm_only(). If this
433− * counter is above zero then only RQF_PM and RQF_PREEMPT requests are
434− * processed.
430+ * counter is above zero then only RQF_PM requests are processed.
435431 */
436432 atomic_t pm_only;
437433