All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Benjamin Marzinski <bmarzins@redhat.com>
Cc: Keith Busch <kbusch@meta.com>,
	dm-devel@lists.linux.dev, mpatocka@redhat.com,
	snitzer@kernel.org
Subject: Re: [PATCH 1/3] dm-integrity: fix mismatched queue limits
Date: Fri, 27 Mar 2026 14:36:19 -0600	[thread overview]
Message-ID: <acbqQ5YaFPMQ23UI@kbusch-mbp> (raw)
In-Reply-To: <acbdfhN8AT7p4qrN@redhat.com>

On Fri, Mar 27, 2026 at 03:41:50PM -0400, Benjamin Marzinski wrote:
> > @@ -4047,9 +4047,15 @@ static void dm_integrity_io_hints(struct dm_target *ti, struct queue_limits *lim
> >  	struct dm_integrity_c *ic = ti->private;
> >  
> >  	if (ic->sectors_per_block > 1) {
> > -		limits->logical_block_size = ic->sectors_per_block << SECTOR_SHIFT;
> > -		limits->physical_block_size = ic->sectors_per_block << SECTOR_SHIFT;
> > -		limits->io_min = ic->sectors_per_block << SECTOR_SHIFT;
> > +		limits->logical_block_size =
> > +				max(limits->logical_block_size,
> > +				    ic->sectors_per_block << SECTOR_SHIFT);
> > +		limits->physical_block_size =
> > +				max(limits->physical_block_size,
> > +				    ic->sectors_per_block << SECTOR_SHIFT);
> > +		limits->io_min =
> > +				max(limits->io_min,
> > +				    ic->sectors_per_block << SECTOR_SHIFT);
> >  		limits->dma_alignment = limits->logical_block_size - 1;
> >  		limits->discard_granularity = ic->sectors_per_block << SECTOR_SHIFT;
> 
> Shouldn't this also respect the underlying device's discard_granularity?

It doesn't appear to. I left it unchanged as I'm not very familiar with
this device mapper, so that seemed safer. But I thought it was fine as
is: this dm doesn't appear to forward discards, so the underlying
device's constraints aren't brought into the operation. It looks like it
just sets a "DISCARD_FILLER" pattern into metadata.

  reply	other threads:[~2026-03-27 20:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 19:36 [PATCH 1/3] dm-integrity: fix mismatched queue limits Keith Busch
2026-03-25 19:36 ` [PATCH 2/3] dm-integrity: always set the io hints Keith Busch
2026-03-25 19:36 ` [PATCH 3/3] dm: provide helper to set stacked limits Keith Busch
2026-03-27 19:41 ` [PATCH 1/3] dm-integrity: fix mismatched queue limits Benjamin Marzinski
2026-03-27 20:36   ` Keith Busch [this message]
2026-03-30 17:41     ` Benjamin Marzinski
2026-03-30 18:16       ` Keith Busch
2026-03-27 21:25 ` Mikulas Patocka

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=acbqQ5YaFPMQ23UI@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=kbusch@meta.com \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@kernel.org \
    /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.