Message ID | 20240703051834.1771374-1-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block: remove QUEUE_FLAG_STOPPED | expand |
On 7/2/24 10:18 PM, Christoph Hellwig wrote: > QUEUE_FLAG_STOPPED is entirely unused. Is this perhaps the patch that removed all QUEUE_FLAG_STOPPED users? a1ce35fa4985 ("block: remove dead elevator code") Anyway: Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
On 03/07/2024 06:18, Christoph Hellwig wrote: > QUEUE_FLAG_STOPPED is entirely unused. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > block/blk-mq-debugfs.c | 1 - > include/linux/blkdev.h | 2 -- > 2 files changed, 3 deletions(-) > > diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c > index 344f9e503bdb32..03d0409e5018c4 100644 > --- a/block/blk-mq-debugfs.c > +++ b/block/blk-mq-debugfs.c > @@ -79,7 +79,6 @@ static int queue_pm_only_show(void *data, struct seq_file *m) > > #define QUEUE_FLAG_NAME(name) [QUEUE_FLAG_##name] = #name > static const char *const blk_queue_flag_name[] = { > - QUEUE_FLAG_NAME(STOPPED), > QUEUE_FLAG_NAME(DYING), > QUEUE_FLAG_NAME(NOMERGES), > QUEUE_FLAG_NAME(SAME_COMP), > diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h > index 4d0d4b83bc740f..26fb272ec5d3bf 100644 > --- a/include/linux/blkdev.h > +++ b/include/linux/blkdev.h > @@ -590,7 +590,6 @@ struct request_queue { > }; > > /* Keep blk_queue_flag_name[] in sync with the definitions below */ > -#define QUEUE_FLAG_STOPPED 0 /* queue is stopped */ > #define QUEUE_FLAG_DYING 1 /* queue being torn down */ I suppose that these should be renumbered, as I think that QUEUE_FLAG_DYING now needs to be index 0 in blk_queue_flag_name[], right? > #define QUEUE_FLAG_NOMERGES 3 /* disable merge attempts */ > #define QUEUE_FLAG_SAME_COMP 4 /* complete on same CPU-group */ > @@ -610,7 +609,6 @@ struct request_queue { > void blk_queue_flag_set(unsigned int flag, struct request_queue *q); > void blk_queue_flag_clear(unsigned int flag, struct request_queue *q); > > -#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) > #define blk_queue_dying(q) test_bit(QUEUE_FLAG_DYING, &(q)->queue_flags) > #define blk_queue_init_done(q) test_bit(QUEUE_FLAG_INIT_DONE, &(q)->queue_flags) > #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags)
On 7/2/2024 10:18 PM, Christoph Hellwig wrote: > QUEUE_FLAG_STOPPED is entirely unused. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- Looks good. Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> -ck
On 03/07/2024 12:55, John Garry wrote: > On 03/07/2024 06:18, Christoph Hellwig wrote: >> QUEUE_FLAG_STOPPED is entirely unused. >> >> Signed-off-by: Christoph Hellwig <hch@lst.de> >> --- >> block/blk-mq-debugfs.c | 1 - >> include/linux/blkdev.h | 2 -- >> 2 files changed, 3 deletions(-) >> >> diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c >> index 344f9e503bdb32..03d0409e5018c4 100644 >> --- a/block/blk-mq-debugfs.c >> +++ b/block/blk-mq-debugfs.c >> @@ -79,7 +79,6 @@ static int queue_pm_only_show(void *data, struct >> seq_file *m) >> #define QUEUE_FLAG_NAME(name) [QUEUE_FLAG_##name] = #name >> static const char *const blk_queue_flag_name[] = { >> - QUEUE_FLAG_NAME(STOPPED), >> QUEUE_FLAG_NAME(DYING), >> QUEUE_FLAG_NAME(NOMERGES), >> QUEUE_FLAG_NAME(SAME_COMP), >> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h >> index 4d0d4b83bc740f..26fb272ec5d3bf 100644 >> --- a/include/linux/blkdev.h >> +++ b/include/linux/blkdev.h >> @@ -590,7 +590,6 @@ struct request_queue { >> }; >> /* Keep blk_queue_flag_name[] in sync with the definitions below */ >> -#define QUEUE_FLAG_STOPPED 0 /* queue is stopped */ >> #define QUEUE_FLAG_DYING 1 /* queue being torn down */ > > I suppose that these should be renumbered, as I think that > QUEUE_FLAG_DYING now needs to be index 0 in blk_queue_flag_name[], right? BTW, we seem to be missing an entry for QUEUE_FLAG_HW_WC in blk_queue_flag_name[] Keeping these in sync needs to be enforced in software. Maybe have QUEUE_FLAG_ as an enum and have a build bug to enforce array size of blk_queue_flag_name matches the "max" in enum QUEUE_FLAG_ . That's a simple way, but does not enforce correct ordering. > >> #define QUEUE_FLAG_NOMERGES 3 /* disable merge attempts */ >> #define QUEUE_FLAG_SAME_COMP 4 /* complete on same CPU-group */ >> @@ -610,7 +609,6 @@ struct request_queue { >> void blk_queue_flag_set(unsigned int flag, struct request_queue *q); >> void blk_queue_flag_clear(unsigned int flag, struct request_queue *q); >> -#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, >> &(q)->queue_flags) >> #define blk_queue_dying(q) test_bit(QUEUE_FLAG_DYING, >> &(q)->queue_flags) >> #define blk_queue_init_done(q) test_bit(QUEUE_FLAG_INIT_DONE, >> &(q)->queue_flags) >> #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, >> &(q)->queue_flags) > >
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index 344f9e503bdb32..03d0409e5018c4 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c @@ -79,7 +79,6 @@ static int queue_pm_only_show(void *data, struct seq_file *m) #define QUEUE_FLAG_NAME(name) [QUEUE_FLAG_##name] = #name static const char *const blk_queue_flag_name[] = { - QUEUE_FLAG_NAME(STOPPED), QUEUE_FLAG_NAME(DYING), QUEUE_FLAG_NAME(NOMERGES), QUEUE_FLAG_NAME(SAME_COMP), diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4d0d4b83bc740f..26fb272ec5d3bf 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -590,7 +590,6 @@ struct request_queue { }; /* Keep blk_queue_flag_name[] in sync with the definitions below */ -#define QUEUE_FLAG_STOPPED 0 /* queue is stopped */ #define QUEUE_FLAG_DYING 1 /* queue being torn down */ #define QUEUE_FLAG_NOMERGES 3 /* disable merge attempts */ #define QUEUE_FLAG_SAME_COMP 4 /* complete on same CPU-group */ @@ -610,7 +609,6 @@ struct request_queue { void blk_queue_flag_set(unsigned int flag, struct request_queue *q); void blk_queue_flag_clear(unsigned int flag, struct request_queue *q); -#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) #define blk_queue_dying(q) test_bit(QUEUE_FLAG_DYING, &(q)->queue_flags) #define blk_queue_init_done(q) test_bit(QUEUE_FLAG_INIT_DONE, &(q)->queue_flags) #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags)
QUEUE_FLAG_STOPPED is entirely unused. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-mq-debugfs.c | 1 - include/linux/blkdev.h | 2 -- 2 files changed, 3 deletions(-)