block: Move a misplaced comment in queue_wb_lat_store()
PATCH 1/1 block: Move a misplaced comment in queue_wb_lat_store()
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").
--- block/blk-sysfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
block/blk-sysfs.c +5 -5
@@ -608,6 +608,11 @@ static ssize_t queue_wb_lat_store(struct gendisk *disk, const char *page,return -EINVAL ; memflags =memalloc_noio_save (); +/* +* 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. +*/ ret =blk_mq_freeze_queue_nomemsave_timeout (q, q->rq_timeout); rqos =wbt_rq_qos (q);
@@ -626,11 +631,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);
Quoted 10 lines · Bart Van Assche
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 commitc125311d96b1("blk-wbt: don't maintain inflight counts if disabled").Cc Christoph Hellwig <[email protected]>Cc Nilay Shroff <[email protected]>Signed-off-by Bart Van Assche <[email protected]>
Looks good to me:
Jens Axboe
maintainerQuoted 7 lines · On Fri, Aug 22, 2025 at 2:02?PM Bart Van Assche <[email protected]> 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 commitc125311d96b1("blk-wbt: don't maintain inflight counts if disabled").
Doesn't apply to the current tree, what is this against? In any case, please resend.
Signature · 1 line
Jens Axboe
Quoted 9 lines · Jens Axboe
Quoted 6 lines · On Fri, Aug 22, 2025 at 2:02?PM Bart Van Assche <[email protected]> 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 commitc125311d96b1("blk-wbt: don't maintain inflight counts if disabled").Doesn't apply to the current tree, what is this against?
These patches are in my local tree and are causing the failure to apply:
"[PATCH 0/3] Fix a deadlock related to modifying queue attributes"
(https://lore.kernel.org/linux-block/[email protected]/). I should have removed these from my local tree before I posted this patch.
Quoted 1 line
In any case, please resend.
Sure, I will do that.
Thanks,
Bart.