From: Bart Van Assche <bvanassche@acm.org>
To: Yu Kuai <yukuai1@huaweicloud.com>,
axboe@kernel.dk, ming.lei@redhat.com, nilay@linux.ibm.com,
jmoyer@redhat.com
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com,
johnny.chenyi@huawei.com
Subject: Re: [patch v2 3/7] blk-mq: add a new queue sysfs attribute async_depth
Date: Thu, 9 Oct 2025 10:05:27 -0700 [thread overview]
Message-ID: <49647ccf-5d19-4ede-87b4-0f7ff8e9f5ea@acm.org> (raw)
In-Reply-To: <20251009074634.527661-4-yukuai1@huaweicloud.com>
On 10/9/25 12:46 AM, Yu Kuai wrote:
> +static ssize_t queue_async_depth_show(struct gendisk *disk, char *page)
> +{
> + ssize_t ret;
> +
> + mutex_lock(&disk->queue->elevator_lock);
> + ret = queue_var_show(disk->queue->async_depth, page);
> + mutex_unlock(&disk->queue->elevator_lock);
> + return ret;
> +}
Functions like the above can be simplified by using guard(mutex)(...) or
scoped_guard(mutex, ...).
Thanks,
Bart.
next prev parent reply other threads:[~2025-10-09 17:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 7:46 [patch v2 0/7] blk-mq: introduce new queue attribute async_depth Yu Kuai
2025-10-09 7:46 ` [patch v2 1/7] block: convert nr_requests to unsigned int Yu Kuai
2025-10-09 7:46 ` [patch v2 2/7] blk-mq-sched: unify elevators checking for async requests Yu Kuai
2025-10-09 11:15 ` Nilay Shroff
2025-10-09 17:02 ` Bart Van Assche
2025-10-10 2:01 ` Yu Kuai
2025-10-09 7:46 ` [patch v2 3/7] blk-mq: add a new queue sysfs attribute async_depth Yu Kuai
2025-10-09 11:20 ` Nilay Shroff
2025-10-09 17:05 ` Bart Van Assche [this message]
2025-10-09 17:19 ` Yu Kuai
2025-10-09 7:46 ` [patch v2 4/7] kyber: covert to use request_queue->async_depth Yu Kuai
2025-10-09 11:20 ` Nilay Shroff
2025-10-09 7:46 ` [patch v2 5/7] mq-deadline: " Yu Kuai
2025-10-09 11:21 ` Nilay Shroff
2025-10-09 17:12 ` Bart Van Assche
2025-10-09 7:46 ` [patch v2 6/7] block, bfq: convert " Yu Kuai
2025-10-09 11:22 ` Nilay Shroff
2025-10-09 7:46 ` [patch v2 7/7] blk-mq: add documentation for new queue attribute async_dpeth Yu Kuai
2025-10-09 11:22 ` Nilay Shroff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49647ccf-5d19-4ede-87b4-0f7ff8e9f5ea@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=jmoyer@redhat.com \
--cc=johnny.chenyi@huawei.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=nilay@linux.ibm.com \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox