From: Christoph Hellwig <hch@infradead.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, martin.petersen@oracle.com
Subject: Re: [PATCH 2/3] block/integrity: flag the queue if it has an integrity profile
Date: Thu, 11 Jan 2024 08:06:24 -0800 [thread overview]
Message-ID: <ZaASADP4js2Oboqx@infradead.org> (raw)
In-Reply-To: <20240111160226.1936351-3-axboe@kernel.dk>
On Thu, Jan 11, 2024 at 09:00:20AM -0700, Jens Axboe wrote:
> Now that we don't set a dummy profile, if someone registers and actual
> profile, flag the queue as such.
>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> ---
> block/blk-integrity.c | 14 +++++++++-----
> include/linux/blkdev.h | 1 +
> 2 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/block/blk-integrity.c b/block/blk-integrity.c
> index a1ea1794c7c8..974af93de2da 100644
> --- a/block/blk-integrity.c
> +++ b/block/blk-integrity.c
> @@ -339,22 +339,25 @@ const struct attribute_group blk_integrity_attr_group = {
> */
> void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template)
> {
> - struct blk_integrity *bi = &disk->queue->integrity;
> + struct request_queue *q = disk->queue;
> + struct blk_integrity *bi = &q->integrity;
>
> bi->flags = BLK_INTEGRITY_VERIFY | BLK_INTEGRITY_GENERATE |
> template->flags;
> bi->interval_exp = template->interval_exp ? :
> - ilog2(queue_logical_block_size(disk->queue));
> + ilog2(queue_logical_block_size(q));
> bi->profile = template->profile;
> + if (bi->profile)
> + blk_queue_flag_set(QUEUE_FLAG_INTG_PROFILE, q);
Is this really so much better vs just checking for bi->profile
being non-NULL?
next prev parent reply other threads:[~2024-01-11 16:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 16:00 [PATCHSET 0/3] Integrity cleanups and optimization Jens Axboe
2024-01-11 16:00 ` [PATCH 1/3] block/integrity: make profile optional Jens Axboe
2024-01-11 16:05 ` Christoph Hellwig
2024-01-11 16:09 ` Keith Busch
2024-01-11 16:19 ` Jens Axboe
2024-01-11 16:00 ` [PATCH 2/3] block/integrity: flag the queue if it has an integrity profile Jens Axboe
2024-01-11 16:06 ` Christoph Hellwig [this message]
2024-01-11 16:16 ` Jens Axboe
2024-01-11 16:18 ` Christoph Hellwig
2024-01-11 16:00 ` [PATCH 3/3] block: only call bio_integrity_prep() if necessary Jens Axboe
2024-01-11 16:28 ` Keith Busch
2024-01-11 18:50 ` Jens Axboe
2024-01-11 16:08 ` [PATCHSET 0/3] Integrity cleanups and optimization Christoph Hellwig
2024-01-11 16:24 ` Martin K. Petersen
2024-01-11 16:34 ` Mike Snitzer
2024-01-11 17:07 ` Mike Snitzer
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=ZaASADP4js2Oboqx@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.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.