From: Hannes Reinecke <hare@suse.de>
To: Bart Van Assche <bart.vanassche@wdc.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Bart Van Assche <bart.vanassche@sandisk.com>,
Hannes Reinecke <hare@suse.com>, Omar Sandoval <osandov@fb.com>,
Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH v4 07/12] block: Add a comment above queue_lockdep_assert_held()
Date: Tue, 20 Jun 2017 08:39:30 +0200 [thread overview]
Message-ID: <b147fd56-075d-e151-1e00-e7ec2c8fce68@suse.de> (raw)
In-Reply-To: <20170619220801.12557-8-bart.vanassche@wdc.com>
On 06/20/2017 12:07 AM, Bart Van Assche wrote:
> From: Bart Van Assche <bart.vanassche@sandisk.com>
>
> Add a comment above the queue_lockdep_assert_held() macro that
> explains the purpose of the q->queue_lock test.
>
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Omar Sandoval <osandov@fb.com>
> Cc: Ming Lei <ming.lei@redhat.com>
> ---
> include/linux/blkdev.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index ff0ae83235ea..c00a6b99e77c 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -635,6 +635,13 @@ struct request_queue {
> (1 << QUEUE_FLAG_SAME_COMP) | \
> (1 << QUEUE_FLAG_POLL))
>
> +/*
> + * @q->queue_lock is set while a queue is being initialized. Since we know
> + * that no other threads access the queue object before @q->queue_lock has
> + * been set, it is safe to manipulate queue flags without holding the
> + * queue_lock if @q->queue_lock == NULL. See also blk_alloc_queue_node() and
> + * blk_init_allocated_queue().
> + */
> static inline void queue_lockdep_assert_held(struct request_queue *q)
> {
> if (q->queue_lock)
>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
next prev parent reply other threads:[~2017-06-20 6:39 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-19 22:07 [PATCH v4 00/12] More patches for kernel v4.13 Bart Van Assche
2017-06-19 22:07 ` [PATCH v4 01/12] blk-mq: Reduce blk_mq_hw_ctx size Bart Van Assche
2017-06-20 6:31 ` Hannes Reinecke
2017-06-19 22:07 ` [PATCH v4 02/12] block: Make request operation type argument declarations consistent Bart Van Assche
2017-06-20 6:32 ` Hannes Reinecke
2017-06-19 22:07 ` [PATCH v4 03/12] block: Introduce request_queue.initialize_rq_fn() Bart Van Assche
2017-06-19 22:22 ` Jens Axboe
2017-06-20 6:34 ` Hannes Reinecke
2017-06-19 22:07 ` [PATCH v4 04/12] block: Make most scsi_req_init() calls implicit Bart Van Assche
2017-06-20 6:37 ` Hannes Reinecke
2017-06-20 17:39 ` Bart Van Assche
2017-06-19 22:07 ` [PATCH v4 05/12] block: Change argument type of scsi_req_init() Bart Van Assche
2017-06-20 6:38 ` Hannes Reinecke
2017-06-19 22:07 ` [PATCH v4 06/12] blk-mq: Initialize .rq_flags in blk_mq_rq_ctx_init() Bart Van Assche
2017-06-20 6:39 ` Hannes Reinecke
2017-06-20 9:22 ` Christoph Hellwig
2017-06-19 22:07 ` [PATCH v4 07/12] block: Add a comment above queue_lockdep_assert_held() Bart Van Assche
2017-06-20 6:39 ` Hannes Reinecke [this message]
2017-06-19 22:07 ` [PATCH v4 08/12] block: Check locking assumptions at runtime Bart Van Assche
2017-06-20 6:40 ` Hannes Reinecke
2017-06-19 22:07 ` [PATCH v4 09/12] block: Document what queue type each function is intended for Bart Van Assche
2017-06-20 6:41 ` Hannes Reinecke
2017-06-19 22:07 ` [PATCH v4 10/12] blk-mq: Document locking assumptions Bart Van Assche
2017-06-20 6:42 ` Hannes Reinecke
2017-06-19 22:08 ` [PATCH v4 11/12] block: Constify disk_type Bart Van Assche
2017-06-20 6:43 ` Hannes Reinecke
2017-06-19 22:08 ` [PATCH v4 12/12] blk-mq: Warn when attempting to run a hardware queue that is not mapped Bart Van Assche
2017-06-19 23:06 ` Jens Axboe
2017-06-19 23:10 ` Bart Van Assche
2017-06-20 6:43 ` Hannes Reinecke
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=b147fd56-075d-e151-1e00-e7ec2c8fce68@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@sandisk.com \
--cc=bart.vanassche@wdc.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=osandov@fb.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 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.