[PATCH] block: Drop leftover references to RQF_SORTED

STALE2017d

4 messages, 3 authors, 2021-03-01 · open the first message on its own page

[PATCH] block: Drop leftover references to RQF_SORTED

From: Jean Delvare <hidden>
Date: 2021-03-01 11:05:39

Commit a1ce35fa49852db60fc6e268038530be533c5b15 ("block: remove dead
elevator code") removed all users of RQF_SORTED. However it is still
defined, and there is one reference left to it (which in effect is
dead code). Clear it all up.

Signed-off-by: Jean Delvare <redacted>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Ming Lei <redacted>
Cc: Omar Sandoval <redacted>
Cc: Hannes Reinecke <hare@suse.com>
---
 block/blk-mq-debugfs.c |    1 -
 block/blk-mq-sched.c   |    3 ---
 include/linux/blkdev.h |    2 --
 3 files changed, 6 deletions(-)
--- linux-5.11.orig/block/blk-mq-sched.c	2021-02-14 23:32:24.000000000 +0100
+++ linux-5.11/block/blk-mq-sched.c	2021-03-01 11:06:49.629077653 +0100
@@ -408,9 +408,6 @@ static bool blk_mq_sched_bypass_insert(s
 	if ((rq->rq_flags & RQF_FLUSH_SEQ) || blk_rq_is_passthrough(rq))
 		return true;
 
-	if (has_sched)
-		rq->rq_flags |= RQF_SORTED;
-
 	return false;
 }
 
--- linux-5.11.orig/include/linux/blkdev.h	2021-02-14 23:32:24.000000000 +0100
+++ linux-5.11/include/linux/blkdev.h	2021-03-01 11:07:16.006408847 +0100
@@ -65,8 +65,6 @@ typedef void (rq_end_io_fn)(struct reque
  * request flags */
 typedef __u32 __bitwise req_flags_t;
 
-/* elevator knows about this request */
-#define RQF_SORTED		((__force req_flags_t)(1 << 0))
 /* drive already may have started this one */
 #define RQF_STARTED		((__force req_flags_t)(1 << 1))
 /* may not be passed by ioscheduler */
--- linux-5.11.orig/block/blk-mq-debugfs.c	2021-02-14 23:32:24.000000000 +0100
+++ linux-5.11/block/blk-mq-debugfs.c	2021-03-01 11:24:00.031637425 +0100
@@ -292,7 +292,6 @@ static const char *const cmd_flag_name[]
 
 #define RQF_NAME(name) [ilog2((__force u32)RQF_##name)] = #name
 static const char *const rqf_name[] = {
-	RQF_NAME(SORTED),
 	RQF_NAME(STARTED),
 	RQF_NAME(SOFTBARRIER),
 	RQF_NAME(FLUSH_SEQ),

-- 
Jean Delvare
SUSE L3 Support

Re: [PATCH] block: Drop leftover references to RQF_SORTED

From: Jens Axboe <axboe@kernel.dk>
Date: 2021-03-01 15:15:45

On 3/1/21 4:04 AM, Jean Delvare wrote:
quoted hunk
Commit a1ce35fa49852db60fc6e268038530be533c5b15 ("block: remove dead
elevator code") removed all users of RQF_SORTED. However it is still
defined, and there is one reference left to it (which in effect is
dead code). Clear it all up.

Signed-off-by: Jean Delvare <redacted>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Ming Lei <redacted>
Cc: Omar Sandoval <redacted>
Cc: Hannes Reinecke <hare@suse.com>
---
 block/blk-mq-debugfs.c |    1 -
 block/blk-mq-sched.c   |    3 ---
 include/linux/blkdev.h |    2 --
 3 files changed, 6 deletions(-)
--- linux-5.11.orig/block/blk-mq-sched.c	2021-02-14 23:32:24.000000000 +0100
+++ linux-5.11/block/blk-mq-sched.c	2021-03-01 11:06:49.629077653 +0100
@@ -408,9 +408,6 @@ static bool blk_mq_sched_bypass_insert(s
 	if ((rq->rq_flags & RQF_FLUSH_SEQ) || blk_rq_is_passthrough(rq))
 		return true;
 
-	if (has_sched)
-		rq->rq_flags |= RQF_SORTED;
-
 	return false;
 }
Since that's the only reason why we are passing in 'has_sched', you should
kill that argument as well from the function and the single caller.

-- 
Jens Axboe

Re: [PATCH] block: Drop leftover references to RQF_SORTED

From: Jean Delvare <hidden>
Date: 2021-03-01 16:22:08

Hi Jens,

On Mon, 1 Mar 2021 08:13:18 -0700, Jens Axboe wrote:
On 3/1/21 4:04 AM, Jean Delvare wrote:
quoted
Commit a1ce35fa49852db60fc6e268038530be533c5b15 ("block: remove dead
elevator code") removed all users of RQF_SORTED. However it is still
defined, and there is one reference left to it (which in effect is
dead code). Clear it all up.

Signed-off-by: Jean Delvare <redacted>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Ming Lei <redacted>
Cc: Omar Sandoval <redacted>
Cc: Hannes Reinecke <hare@suse.com>
---
 block/blk-mq-debugfs.c |    1 -
 block/blk-mq-sched.c   |    3 ---
 include/linux/blkdev.h |    2 --
 3 files changed, 6 deletions(-)
--- linux-5.11.orig/block/blk-mq-sched.c	2021-02-14 23:32:24.000000000 +0100
+++ linux-5.11/block/blk-mq-sched.c	2021-03-01 11:06:49.629077653 +0100
@@ -408,9 +408,6 @@ static bool blk_mq_sched_bypass_insert(s
 	if ((rq->rq_flags & RQF_FLUSH_SEQ) || blk_rq_is_passthrough(rq))
 		return true;
 
-	if (has_sched)
-		rq->rq_flags |= RQF_SORTED;
-
 	return false;
 }  
Since that's the only reason why we are passing in 'has_sched', you should
kill that argument as well from the function and the single caller.
Sorry, missed that. Surprised the compiler didn't warn.

I'll post a v2 shortly.

Thanks,
-- 
Jean Delvare
SUSE L3 Support

Re: [PATCH] block: Drop leftover references to RQF_SORTED

From: Hannes Reinecke <hare@suse.de>
Date: 2021-03-01 16:48:57

On 3/1/21 12:04 PM, Jean Delvare wrote:
quoted hunk
Commit a1ce35fa49852db60fc6e268038530be533c5b15 ("block: remove dead
elevator code") removed all users of RQF_SORTED. However it is still
defined, and there is one reference left to it (which in effect is
dead code). Clear it all up.

Signed-off-by: Jean Delvare <redacted>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Ming Lei <redacted>
Cc: Omar Sandoval <redacted>
Cc: Hannes Reinecke <hare@suse.com>
---
  block/blk-mq-debugfs.c |    1 -
  block/blk-mq-sched.c   |    3 ---
  include/linux/blkdev.h |    2 --
  3 files changed, 6 deletions(-)
--- linux-5.11.orig/block/blk-mq-sched.c	2021-02-14 23:32:24.000000000 +0100
+++ linux-5.11/block/blk-mq-sched.c	2021-03-01 11:06:49.629077653 +0100
@@ -408,9 +408,6 @@ static bool blk_mq_sched_bypass_insert(s
  	if ((rq->rq_flags & RQF_FLUSH_SEQ) || blk_rq_is_passthrough(rq))
  		return true;
  
-	if (has_sched)
-		rq->rq_flags |= RQF_SORTED;
-
  	return false;
  }
  
--- linux-5.11.orig/include/linux/blkdev.h	2021-02-14 23:32:24.000000000 +0100
+++ linux-5.11/include/linux/blkdev.h	2021-03-01 11:07:16.006408847 +0100
@@ -65,8 +65,6 @@ typedef void (rq_end_io_fn)(struct reque
   * request flags */
  typedef __u32 __bitwise req_flags_t;
  
-/* elevator knows about this request */
-#define RQF_SORTED		((__force req_flags_t)(1 << 0))
  /* drive already may have started this one */
  #define RQF_STARTED		((__force req_flags_t)(1 << 1))
  /* may not be passed by ioscheduler */
--- linux-5.11.orig/block/blk-mq-debugfs.c	2021-02-14 23:32:24.000000000 +0100
+++ linux-5.11/block/blk-mq-debugfs.c	2021-03-01 11:24:00.031637425 +0100
@@ -292,7 +292,6 @@ static const char *const cmd_flag_name[]
  
  #define RQF_NAME(name) [ilog2((__force u32)RQF_##name)] = #name
  static const char *const rqf_name[] = {
-	RQF_NAME(SORTED),
  	RQF_NAME(STARTED),
  	RQF_NAME(SOFTBARRIER),
  	RQF_NAME(FLUSH_SEQ),
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help