From: Mike Snitzer <snitzer@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
Mikulas Patocka <mpatocka@redhat.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
dm-devel@lists.linux.dev, nvdimm@lists.linux.dev,
linux-block@vger.kernel.org
Subject: Re: [PATCH 3/3] dm-integrity: set max_integrity_segments in dm_integrity_io_hints
Date: Wed, 6 Mar 2024 12:25:42 -0500 [thread overview]
Message-ID: <ZeinFsPEsajU__Iv@redhat.com> (raw)
In-Reply-To: <20240306142739.237234-4-hch@lst.de>
On Wed, Mar 06 2024 at 9:27P -0500,
Christoph Hellwig <hch@lst.de> wrote:
> Set max_integrity_segments with the other queue limits instead
> of updating it later. This also uncovered that the driver is trying
> to set the limit to UINT_MAX while max_integrity_segments is an
> unsigned short, so fix it up to use USHRT_MAX instead.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/md/dm-integrity.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
> index c5f03aab455256..a2e5cfe84565ae 100644
> --- a/drivers/md/dm-integrity.c
> +++ b/drivers/md/dm-integrity.c
> @@ -3419,6 +3419,7 @@ static void dm_integrity_io_hints(struct dm_target *ti, struct queue_limits *lim
> blk_limits_io_min(limits, ic->sectors_per_block << SECTOR_SHIFT);
> limits->dma_alignment = limits->logical_block_size - 1;
> }
> + limits->max_integrity_segments = USHRT_MAX;
> }
>
> static void calculate_journal_section_size(struct dm_integrity_c *ic)
> @@ -3586,7 +3587,6 @@ static void dm_integrity_set(struct dm_target *ti, struct dm_integrity_c *ic)
> bi.interval_exp = ic->sb->log2_sectors_per_block + SECTOR_SHIFT;
>
> blk_integrity_register(disk, &bi);
> - blk_queue_max_integrity_segments(disk->queue, UINT_MAX);
> }
>
> static void dm_integrity_free_page_list(struct page_list *pl)
> --
> 2.39.2
>
I've picked this up for 6.9:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-6.9&id=f30e5ed1306be8a900b33317bc429dd3794d81a1
Thanks.
next prev parent reply other threads:[~2024-03-06 17:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 14:27 remove calls to blk_queue_max_integrity_segments Christoph Hellwig
2024-03-06 14:27 ` [PATCH 1/3] nvdimm: remove nd_integrity_init Christoph Hellwig
2024-03-06 14:27 ` [PATCH 2/3] nvdimm/btt: always set max_integrity_segments Christoph Hellwig
2024-03-06 14:27 ` [PATCH 3/3] dm-integrity: set max_integrity_segments in dm_integrity_io_hints Christoph Hellwig
2024-03-06 17:25 ` Mike Snitzer [this message]
2024-03-06 21:57 ` Christoph Hellwig
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=ZeinFsPEsajU__Iv@redhat.com \
--to=snitzer@kernel.org \
--cc=axboe@kernel.dk \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dm-devel@lists.linux.dev \
--cc=hch@lst.de \
--cc=ira.weiny@intel.com \
--cc=linux-block@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.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