block: fix the blk_queue_nonrot polarity
PATCH 1/1 block: fix the blk_queue_nonrot polarity
Take care of the inverse polarity of the BLK_FEAT_ROTATIONAL flag vs the old nonrot helper.
Fixes bd4a633b6f7c ("block: move the nonrot flag to queue_limits")
Reported-by kernel test robot <[email protected]>
Reported-by Keith Busch <[email protected]>
Signed-off-by Christoph Hellwig <[email protected]>
--- include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/blkdev.h +1 -1
@@ -617,7 +617,7 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q);#define blk_queue_nomerges (q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags)#define blk_queue_noxmerges (q) \ test_bit(QUEUE_FLAG_NOXMERGES, &(q)->queue_flags) -#define blk_queue_nonrot (q) ((q)->limits.features & BLK_FEAT_ROTATIONAL) +#define blk_queue_nonrot (q) (!((q)->limits.features & BLK_FEAT_ROTATIONAL))#define blk_queue_io_stat (q) ((q)->limits.features & BLK_FEAT_IO_STAT)#define blk_queue_zone_resetall (q) \ ((q)->limits.features & BLK_FEAT_ZONE_RESETALL)
Signature · 1 line
2.43.0
Quoted 16 lines · Christoph Hellwig
Take care of the inverse polarity of the
BLK_FEAT_ROTATIONALflag vs the old nonrot helper.Fixes bd4a633b6f7c ("block: move the nonrot flag to queue_limits")Reported-by kernel test robot <[email protected]>Reported-by Keith Busch <[email protected]>Signed-off-by Christoph Hellwig <[email protected]>--- include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/blkdev.h +0
-0
include/linux/blkdev.h bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q); · line 623
Quoted 8 lines
include/linux/blkdev.h +1
-1@@ -617,7 +617,7 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q);#define blk_queue_nomerges (q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags)#define blk_queue_noxmerges (q) \ test_bit(QUEUE_FLAG_NOXMERGES, &(q)->queue_flags) -#define blk_queue_nonrot (q) ((q)->limits.features & BLK_FEAT_ROTATIONAL) +#define blk_queue_nonrot (q) (!((q)->limits.features & BLK_FEAT_ROTATIONAL))#define blk_queue_io_stat (q) ((q)->limits.features & BLK_FEAT_IO_STAT)#define blk_queue_zone_resetall (q) \ ((q)->limits.features & BLK_FEAT_ZONE_RESETALL)
Reviewed-by Bart Van Assche <[email protected]>
Quoted 4 lines · Christoph Hellwig
Take care of the inverse polarity of the
BLK_FEAT_ROTATIONALflag vs the old nonrot helper.
Applied, thanks!
[1/1] block: fix the blk_queue_nonrot polarity
commit: 44348870de4b8f292f97b84583a298d66fbaf738
Best regards,
Signature · 1 line
Jens Axboe