public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH 3/4] nvme: fix max_discard_sectors calculation
Date: Mon, 10 Jul 2023 08:39:48 +0200	[thread overview]
Message-ID: <20230710063948.GA24519@lst.de> (raw)
In-Reply-To: <06da81f9-dbdd-f706-0e26-afcfb89cfe32@kernel.org>

On Mon, Jul 10, 2023 at 12:57:56PM +0900, Damien Le Moal wrote:
> On 7/7/23 18:46, Christoph Hellwig wrote:
> > ctrl->max_discard_sectors stores a value that is potentially based of
> > the DMRSL field in Identify Controller, which is in units of LBAs and
> > thus dependent on the Format of a namespace.
> > 
> > Fix this by moving the calculation of max_discard_sectors entirely
> > into nvme_config_discard and replacing the ctrl->max_discard_sectors
> > value with a local variable so that the calculation is always
> 
> I do not see a local variable replacement... May be you meant direct calls to
> blk_queue_max_discard_sectors() ?

Yeah, I used a local variable first, but then noticed they are
pointless as we can just call blk_queue_max_discard_sectors directly
and didn't update the commit log.


  reply	other threads:[~2023-07-10  6:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  9:46 fix discard limits Christoph Hellwig
2023-07-07  9:46 ` [PATCH 1/4] block: don't unconditionally set max_discard_sectors in blk_queue_max_discard_sectors Christoph Hellwig
2023-07-10  3:53   ` Damien Le Moal
2023-07-10  9:29   ` Sagi Grimberg
2023-07-10 10:42   ` Ming Lei
2023-07-12 16:23     ` Christoph Hellwig
2023-07-12 16:38       ` Keith Busch
2023-07-10 15:01   ` Keith Busch
2023-07-07  9:46 ` [PATCH 2/4] nvme: update discard limits in nvme_config_discard Christoph Hellwig
2023-07-10  3:54   ` Damien Le Moal
2023-07-10  9:29   ` Sagi Grimberg
2023-07-07  9:46 ` [PATCH 3/4] nvme: fix max_discard_sectors calculation Christoph Hellwig
2023-07-10  3:57   ` Damien Le Moal
2023-07-10  6:39     ` Christoph Hellwig [this message]
2023-07-10  9:31   ` Sagi Grimberg
2023-07-07  9:46 ` [PATCH 4/4] nvme: simplify the max_discard_segments calculation Christoph Hellwig
2023-07-10  9:32   ` Sagi Grimberg
  -- strict thread matches above, loose matches on Subject: below --
2023-12-26  8:58 nvme discard limits fix and tidy ups Christoph Hellwig
2023-12-26  8:58 ` [PATCH 3/4] nvme: fix max_discard_sectors calculation Christoph Hellwig
2024-01-02 17:28   ` Keith Busch

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=20230710063948.GA24519@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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