Skip to content

Commit a4d34da

Browse files
bvanasschemartinkpetersen
authored andcommitted
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. Link: https://lore.kernel.org/r/[email protected] Cc: Can Guo <[email protected]> Cc: Stanley Chu <[email protected]> Cc: Alan Stern <[email protected]> Cc: Ming Lei <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Martin Kepplinger <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Reviewed-by: Can Guo <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent e6044f7 commit a4d34da

File tree

5 files changed

+4
-14
lines changed

5 files changed

+4
-14
lines changed

block/blk-core.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,11 @@ EXPORT_SYMBOL(blk_cleanup_queue);
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,
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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ static const char *const rqf_name[] = {
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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,6 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,6 @@ enum {
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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ typedef __u32 __bitwise req_flags_t;
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 {
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

0 commit comments

Comments
 (0)