Re: [PATCH v6 1/4] block: add blk_mq_is_queue_frozen()

From
Christoph Hellwig <hch@infradead.org>
Date
2021-03-09 17:21:05
Also in
dm-devel, linux-api, linux-block, lkml
Reply to
Sergei Shtepa, 2021-03-03
On Wed, Mar 03, 2021 at 03:30:15PM +0300, Sergei Shtepa wrote:
quoted hunk ↗ jump to hunk
+bool blk_mq_is_queue_frozen(struct request_queue *q)
+{
+	bool ret;
+
+	mutex_lock(&q->mq_freeze_lock);
+	ret = percpu_ref_is_dying(&q->q_usage_counter) && percpu_ref_is_zero(&q->q_usage_counter);
Please avoid the overly long line.

Also maybe frozen is a better name for the variable currently called
ret?
Thread (13 messages) 13 messages, 2 authors, last reply 2021-03-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help