* [PATCH] block: cleanup for blk_cleanup_queue()
@ 2019-04-07 11:03 Shenghui Wang
2019-04-07 14:18 ` Bart Van Assche
0 siblings, 1 reply; 2+ messages in thread
From: Shenghui Wang @ 2019-04-07 11:03 UTC (permalink / raw)
To: axboe, linux-block
2 small cleanup:
* blk_set_queue_dying(q) has set QUEUE_FLAG_DYING. Remove the redundant
statement 'blk_queue_flag_set(QUEUE_FLAG_DYING, q)'
* requests queued drained before DEAD marking, not DYING marking.
Update the comment.
Signed-off-by: Shenghui Wang <shhuiw@foxmail.com>
---
block/blk-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 4673ebe42255..177377becfab 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -334,11 +334,10 @@ void blk_cleanup_queue(struct request_queue *q)
blk_queue_flag_set(QUEUE_FLAG_NOMERGES, q);
blk_queue_flag_set(QUEUE_FLAG_NOXMERGES, q);
- blk_queue_flag_set(QUEUE_FLAG_DYING, q);
mutex_unlock(&q->sysfs_lock);
/*
- * Drain all requests queued before DYING marking. Set DEAD flag to
+ * Drain all requests queued before DEAD marking. Set DEAD flag to
* prevent that q->request_fn() gets invoked after draining finished.
*/
blk_freeze_queue(q);
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] block: cleanup for blk_cleanup_queue()
2019-04-07 11:03 [PATCH] block: cleanup for blk_cleanup_queue() Shenghui Wang
@ 2019-04-07 14:18 ` Bart Van Assche
0 siblings, 0 replies; 2+ messages in thread
From: Bart Van Assche @ 2019-04-07 14:18 UTC (permalink / raw)
To: Shenghui Wang, axboe, linux-block
On 4/7/19 4:03 AM, Shenghui Wang wrote:
> /*
> - * Drain all requests queued before DYING marking. Set DEAD flag to
> + * Drain all requests queued before DEAD marking. Set DEAD flag to
> * prevent that q->request_fn() gets invoked after draining finished.
> */
No new requests can be queued between the "dying" and "dead" states. I
wrote "dying" in that comment because I meant "dying". See also commit
3f3299d5c026 ("block: Rename queue dead flag").
Bart.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-07 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-07 11:03 [PATCH] block: cleanup for blk_cleanup_queue() Shenghui Wang
2019-04-07 14:18 ` Bart Van Assche
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.