* [PATCH v2] block: Move a misplaced comment in queue_wb_lat_store()
@ 2025-08-25 15:14 Bart Van Assche
2025-08-25 19:19 ` Martin K. Petersen
2025-08-25 20:48 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2025-08-25 15:14 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, Bart Van Assche, Nilay Shroff
blk_mq_quiesce_queue() does not wait for pending I/O to finish. Freezing
a queue waits for pending I/O to finish. Hence move the comment that
refers to waiting for pending I/O above the call that freezes the
request queue. This patch moves this comment back to the position where
it was when this comment was introduced. See also commit c125311d96b1
("blk-wbt: don't maintain inflight counts if disabled").
Cc: Christoph Hellwig <hch@lst.de>
Cc: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
Changes compared to v1: rebased on top of Jen's for-next branch.
block/blk-sysfs.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 4a7f1a349998..c94b8b6ab024 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -620,6 +620,11 @@ static ssize_t queue_wb_lat_store(struct gendisk *disk, const char *page,
if (val < -1)
return -EINVAL;
+ /*
+ * Ensure that the queue is idled, in case the latency update
+ * ends up either enabling or disabling wbt completely. We can't
+ * have IO inflight if that happens.
+ */
memflags = blk_mq_freeze_queue(q);
rqos = wbt_rq_qos(q);
@@ -638,11 +643,6 @@ static ssize_t queue_wb_lat_store(struct gendisk *disk, const char *page,
if (wbt_get_min_lat(q) == val)
goto out;
- /*
- * Ensure that the queue is idled, in case the latency update
- * ends up either enabling or disabling wbt completely. We can't
- * have IO inflight if that happens.
- */
blk_mq_quiesce_queue(q);
mutex_lock(&disk->rqos_state_mutex);
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] block: Move a misplaced comment in queue_wb_lat_store()
2025-08-25 15:14 [PATCH v2] block: Move a misplaced comment in queue_wb_lat_store() Bart Van Assche
@ 2025-08-25 19:19 ` Martin K. Petersen
2025-08-25 20:48 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2025-08-25 19:19 UTC (permalink / raw)
To: Bart Van Assche; +Cc: Jens Axboe, linux-block, Christoph Hellwig, Nilay Shroff
Bart,
> blk_mq_quiesce_queue() does not wait for pending I/O to finish. Freezing
> a queue waits for pending I/O to finish. Hence move the comment that
> refers to waiting for pending I/O above the call that freezes the
> request queue. This patch moves this comment back to the position where
> it was when this comment was introduced. See also commit c125311d96b1
> ("blk-wbt: don't maintain inflight counts if disabled").
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] block: Move a misplaced comment in queue_wb_lat_store()
2025-08-25 15:14 [PATCH v2] block: Move a misplaced comment in queue_wb_lat_store() Bart Van Assche
2025-08-25 19:19 ` Martin K. Petersen
@ 2025-08-25 20:48 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2025-08-25 20:48 UTC (permalink / raw)
To: Bart Van Assche; +Cc: linux-block, Christoph Hellwig, Nilay Shroff
On Mon, 25 Aug 2025 08:14:24 -0700, Bart Van Assche wrote:
> blk_mq_quiesce_queue() does not wait for pending I/O to finish. Freezing
> a queue waits for pending I/O to finish. Hence move the comment that
> refers to waiting for pending I/O above the call that freezes the
> request queue. This patch moves this comment back to the position where
> it was when this comment was introduced. See also commit c125311d96b1
> ("blk-wbt: don't maintain inflight counts if disabled").
>
> [...]
Applied, thanks!
[1/1] block: Move a misplaced comment in queue_wb_lat_store()
commit: f5d10e6915d80f7f4c4ed445a8b8ba4a5ee79318
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-25 20:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25 15:14 [PATCH v2] block: Move a misplaced comment in queue_wb_lat_store() Bart Van Assche
2025-08-25 19:19 ` Martin K. Petersen
2025-08-25 20:48 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox