From: Greg Kroah-Hartman Date: Tue, 18 Oct 2022 17:27:00 +0000 (+0200) Subject: drop block-replace-blk_queue_nowait-with-bdev_nowait.patch X-Git-Tag: v6.0.3~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23e3b3d6dd37ad52cb7a9984f46d138a18269596;p=thirdparty%2Fkernel%2Fstable-queue.git drop block-replace-blk_queue_nowait-with-bdev_nowait.patch --- diff --git a/queue-5.19/block-replace-blk_queue_nowait-with-bdev_nowait.patch b/queue-5.19/block-replace-blk_queue_nowait-with-bdev_nowait.patch deleted file mode 100644 index c6be6094115..00000000000 --- a/queue-5.19/block-replace-blk_queue_nowait-with-bdev_nowait.patch +++ /dev/null @@ -1,116 +0,0 @@ -From f4d158f7c6ee4371a447a0c2c515a6b049c7fac0 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 27 Sep 2022 09:58:15 +0200 -Subject: block: replace blk_queue_nowait with bdev_nowait - -From: Christoph Hellwig - -[ Upstream commit 568ec936bf1384fc15873908c96a9aeb62536edb ] - -Replace blk_queue_nowait with a bdev_nowait helpers that takes the -block_device given that the I/O submission path should not have to -look into the request_queue. - -Signed-off-by: Christoph Hellwig -Reviewed-by: Pankaj Raghav -Link: https://lore.kernel.org/r/20220927075815.269694-1-hch@lst.de -Signed-off-by: Jens Axboe -Signed-off-by: Sasha Levin ---- - block/blk-core.c | 2 +- - drivers/md/dm-table.c | 4 +--- - drivers/md/md.c | 4 ++-- - include/linux/blkdev.h | 6 +++++- - io_uring/io_uring.c | 2 +- - 5 files changed, 10 insertions(+), 8 deletions(-) - -diff --git a/block/blk-core.c b/block/blk-core.c -index 7743c68177e8..5970c47ae86f 100644 ---- a/block/blk-core.c -+++ b/block/blk-core.c -@@ -727,7 +727,7 @@ void submit_bio_noacct(struct bio *bio) - * For a REQ_NOWAIT based request, return -EOPNOTSUPP - * if queue does not support NOWAIT. - */ -- if ((bio->bi_opf & REQ_NOWAIT) && !blk_queue_nowait(q)) -+ if ((bio->bi_opf & REQ_NOWAIT) && !bdev_nowait(bdev)) - goto not_supported; - - if (should_fail_bio(bio)) -diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c -index bd539afbfe88..1f73ce6ac925 100644 ---- a/drivers/md/dm-table.c -+++ b/drivers/md/dm-table.c -@@ -1869,9 +1869,7 @@ static bool dm_table_supports_write_zeroes(struct dm_table *t) - static int device_not_nowait_capable(struct dm_target *ti, struct dm_dev *dev, - sector_t start, sector_t len, void *data) - { -- struct request_queue *q = bdev_get_queue(dev->bdev); -- -- return !blk_queue_nowait(q); -+ return !bdev_nowait(dev->bdev); - } - - static bool dm_table_supports_nowait(struct dm_table *t) -diff --git a/drivers/md/md.c b/drivers/md/md.c -index 25d18b67a162..cb8eddcd018e 100644 ---- a/drivers/md/md.c -+++ b/drivers/md/md.c -@@ -5852,7 +5852,7 @@ int md_run(struct mddev *mddev) - } - } - sysfs_notify_dirent_safe(rdev->sysfs_state); -- nowait = nowait && blk_queue_nowait(bdev_get_queue(rdev->bdev)); -+ nowait = nowait && bdev_nowait(rdev->bdev); - } - - if (!bioset_initialized(&mddev->bio_set)) { -@@ -6989,7 +6989,7 @@ static int hot_add_disk(struct mddev *mddev, dev_t dev) - * If the new disk does not support REQ_NOWAIT, - * disable on the whole MD. - */ -- if (!blk_queue_nowait(bdev_get_queue(rdev->bdev))) { -+ if (!bdev_nowait(rdev->bdev)) { - pr_info("%s: Disabling nowait because %pg does not support nowait\n", - mdname(mddev), rdev->bdev); - blk_queue_flag_clear(QUEUE_FLAG_NOWAIT, mddev->queue); -diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h -index 83eb8869a8c9..a49ea5e19a9b 100644 ---- a/include/linux/blkdev.h -+++ b/include/linux/blkdev.h -@@ -614,7 +614,6 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q); - #define blk_queue_quiesced(q) test_bit(QUEUE_FLAG_QUIESCED, &(q)->queue_flags) - #define blk_queue_pm_only(q) atomic_read(&(q)->pm_only) - #define blk_queue_registered(q) test_bit(QUEUE_FLAG_REGISTERED, &(q)->queue_flags) --#define blk_queue_nowait(q) test_bit(QUEUE_FLAG_NOWAIT, &(q)->queue_flags) - #define blk_queue_sq_sched(q) test_bit(QUEUE_FLAG_SQ_SCHED, &(q)->queue_flags) - - extern void blk_set_pm_only(struct request_queue *q); -@@ -1314,6 +1313,11 @@ static inline bool bdev_fua(struct block_device *bdev) - return test_bit(QUEUE_FLAG_FUA, &bdev_get_queue(bdev)->queue_flags); - } - -+static inline bool bdev_nowait(struct block_device *bdev) -+{ -+ return test_bit(QUEUE_FLAG_NOWAIT, &bdev_get_queue(bdev)->queue_flags); -+} -+ - static inline enum blk_zoned_model bdev_zoned_model(struct block_device *bdev) - { - struct request_queue *q = bdev_get_queue(bdev); -diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c -index 096b6d14f40d..81ca3e3ea8de 100644 ---- a/io_uring/io_uring.c -+++ b/io_uring/io_uring.c -@@ -3348,7 +3348,7 @@ static void io_iopoll_req_issued(struct io_kiocb *req, unsigned int issue_flags) - - static bool io_bdev_nowait(struct block_device *bdev) - { -- return !bdev || blk_queue_nowait(bdev_get_queue(bdev)); -+ return !bdev || bdev_nowait(bdev); - } - - /* --- -2.35.1 - diff --git a/queue-5.19/series b/queue-5.19/series index 8e5233f1d7b..2f94b0fbab8 100644 --- a/queue-5.19/series +++ b/queue-5.19/series @@ -783,7 +783,6 @@ nvme-handle-effects-after-freeing-the-request.patch nvme-copy-firmware_rev-on-each-init.patch nvmet-tcp-add-bounds-check-on-transfer-tag.patch usb-idmouse-fix-an-uninit-value-in-idmouse_open.patch -block-replace-blk_queue_nowait-with-bdev_nowait.patch blk-mq-use-quiesced-elevator-switch-when-reinitializ.patch nvmet-don-t-look-at-the-request_queue-in-nvmet_bdev_.patch hwmon-occ-retry-for-checksum-failure.patch diff --git a/queue-6.0/block-replace-blk_queue_nowait-with-bdev_nowait.patch b/queue-6.0/block-replace-blk_queue_nowait-with-bdev_nowait.patch deleted file mode 100644 index 3aef33bf539..00000000000 --- a/queue-6.0/block-replace-blk_queue_nowait-with-bdev_nowait.patch +++ /dev/null @@ -1,116 +0,0 @@ -From ad5478c1cf85137aee014156879d3fcf8342dc5e Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 27 Sep 2022 09:58:15 +0200 -Subject: block: replace blk_queue_nowait with bdev_nowait - -From: Christoph Hellwig - -[ Upstream commit 568ec936bf1384fc15873908c96a9aeb62536edb ] - -Replace blk_queue_nowait with a bdev_nowait helpers that takes the -block_device given that the I/O submission path should not have to -look into the request_queue. - -Signed-off-by: Christoph Hellwig -Reviewed-by: Pankaj Raghav -Link: https://lore.kernel.org/r/20220927075815.269694-1-hch@lst.de -Signed-off-by: Jens Axboe -Signed-off-by: Sasha Levin ---- - block/blk-core.c | 2 +- - drivers/md/dm-table.c | 4 +--- - drivers/md/md.c | 4 ++-- - include/linux/blkdev.h | 6 +++++- - io_uring/io_uring.c | 2 +- - 5 files changed, 10 insertions(+), 8 deletions(-) - -diff --git a/block/blk-core.c b/block/blk-core.c -index 651057c4146b..4ec669b0eadc 100644 ---- a/block/blk-core.c -+++ b/block/blk-core.c -@@ -717,7 +717,7 @@ void submit_bio_noacct(struct bio *bio) - * For a REQ_NOWAIT based request, return -EOPNOTSUPP - * if queue does not support NOWAIT. - */ -- if ((bio->bi_opf & REQ_NOWAIT) && !blk_queue_nowait(q)) -+ if ((bio->bi_opf & REQ_NOWAIT) && !bdev_nowait(bdev)) - goto not_supported; - - if (should_fail_bio(bio)) -diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c -index 332f96b58252..d8034ff0cb24 100644 ---- a/drivers/md/dm-table.c -+++ b/drivers/md/dm-table.c -@@ -1856,9 +1856,7 @@ static bool dm_table_supports_write_zeroes(struct dm_table *t) - static int device_not_nowait_capable(struct dm_target *ti, struct dm_dev *dev, - sector_t start, sector_t len, void *data) - { -- struct request_queue *q = bdev_get_queue(dev->bdev); -- -- return !blk_queue_nowait(q); -+ return !bdev_nowait(dev->bdev); - } - - static bool dm_table_supports_nowait(struct dm_table *t) -diff --git a/drivers/md/md.c b/drivers/md/md.c -index 470a975e4be9..a467b492d4ad 100644 ---- a/drivers/md/md.c -+++ b/drivers/md/md.c -@@ -5845,7 +5845,7 @@ int md_run(struct mddev *mddev) - } - } - sysfs_notify_dirent_safe(rdev->sysfs_state); -- nowait = nowait && blk_queue_nowait(bdev_get_queue(rdev->bdev)); -+ nowait = nowait && bdev_nowait(rdev->bdev); - } - - if (!bioset_initialized(&mddev->bio_set)) { -@@ -6982,7 +6982,7 @@ static int hot_add_disk(struct mddev *mddev, dev_t dev) - * If the new disk does not support REQ_NOWAIT, - * disable on the whole MD. - */ -- if (!blk_queue_nowait(bdev_get_queue(rdev->bdev))) { -+ if (!bdev_nowait(rdev->bdev)) { - pr_info("%s: Disabling nowait because %pg does not support nowait\n", - mdname(mddev), rdev->bdev); - blk_queue_flag_clear(QUEUE_FLAG_NOWAIT, mddev->queue); -diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h -index 84b13fdd34a7..4750772ef228 100644 ---- a/include/linux/blkdev.h -+++ b/include/linux/blkdev.h -@@ -618,7 +618,6 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q); - #define blk_queue_quiesced(q) test_bit(QUEUE_FLAG_QUIESCED, &(q)->queue_flags) - #define blk_queue_pm_only(q) atomic_read(&(q)->pm_only) - #define blk_queue_registered(q) test_bit(QUEUE_FLAG_REGISTERED, &(q)->queue_flags) --#define blk_queue_nowait(q) test_bit(QUEUE_FLAG_NOWAIT, &(q)->queue_flags) - #define blk_queue_sq_sched(q) test_bit(QUEUE_FLAG_SQ_SCHED, &(q)->queue_flags) - - extern void blk_set_pm_only(struct request_queue *q); -@@ -1280,6 +1279,11 @@ static inline bool bdev_fua(struct block_device *bdev) - return test_bit(QUEUE_FLAG_FUA, &bdev_get_queue(bdev)->queue_flags); - } - -+static inline bool bdev_nowait(struct block_device *bdev) -+{ -+ return test_bit(QUEUE_FLAG_NOWAIT, &bdev_get_queue(bdev)->queue_flags); -+} -+ - static inline enum blk_zoned_model bdev_zoned_model(struct block_device *bdev) - { - struct request_queue *q = bdev_get_queue(bdev); -diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c -index c5dd483a7de2..e0e20307bd68 100644 ---- a/io_uring/io_uring.c -+++ b/io_uring/io_uring.c -@@ -1388,7 +1388,7 @@ static void io_iopoll_req_issued(struct io_kiocb *req, unsigned int issue_flags) - - static bool io_bdev_nowait(struct block_device *bdev) - { -- return !bdev || blk_queue_nowait(bdev_get_queue(bdev)); -+ return !bdev || bdev_nowait(bdev); - } - - /* --- -2.35.1 - diff --git a/queue-6.0/series b/queue-6.0/series index 7786cea4d19..29a6282b5fb 100644 --- a/queue-6.0/series +++ b/queue-6.0/series @@ -871,7 +871,6 @@ nvme-handle-effects-after-freeing-the-request.patch nvme-copy-firmware_rev-on-each-init.patch nvmet-tcp-add-bounds-check-on-transfer-tag.patch usb-idmouse-fix-an-uninit-value-in-idmouse_open.patch -block-replace-blk_queue_nowait-with-bdev_nowait.patch blk-mq-use-quiesced-elevator-switch-when-reinitializ.patch nvmet-don-t-look-at-the-request_queue-in-nvmet_bdev_.patch nvmet-don-t-look-at-the-request_queue-in-nvmet_bdev_.patch-7526