From: Richard Weinberger <richard@sigma-star.at>
To: Richard Weinberger <richard@nod.at>,
linux-nvme@lists.infradead.org, upstream@sigma-star.at,
Damien Le Moal <dlemoal@kernel.org>
Cc: linux-kernel@vger.kernel.org, kch@nvidia.com, sagi@grimberg.me,
hch@lst.de, upstream+nvme@sigma-star.at
Subject: Re: [PATCH v2] nvmet: Make blksize_shift configurable
Date: Tue, 01 Jul 2025 17:00:06 +0200 [thread overview]
Message-ID: <3078386.UTt5R2Mg1o@nailgun> (raw)
In-Reply-To: <7c5b852d-4f29-41c7-a171-c0069771a5e0@kernel.org>
On Dienstag, 1. Juli 2025 09:32 Damien Le Moal wrote:
> > The initial intention of this patch was exposing the blksize_shift property.
> > If we want to expose this as more user friendly, I'm fine with it.
> > Maybe "minimum_io_size"?
>
> That likely will be confusing with the existing device limit io_min. I think
> block_size is clear.
Ok!
> >
> >> Also, if the backend is an HDD, do we want to allow the user to configure a
> >> block size that is less than the *physical* block size ? Performance will
> >> suffer on regular HDDs and writes may fail with SMR HDDs.
> >
> > I'm not sure whether it's worth putting more smartness into this logic.
>
> This may be nice to avoid users shooting themselves in the foot with a bad
> setup and us having to deal with bad performance complaints...
> If we do not do anything special, we will be stuck with it as a more
> restrictive setup later may break some (bad) user setups. That is why I raised
> the point :)
Detecting whether the backend is an HDD should work via bdev_nonrot().
So, we could issue a warning if bdev_nonrot() is true and the configured
block size is less than bdev_physical_block_size()?
> >> I am confused... This is going to check both... But if you got STATX_DIOALIGN
> >> and it is OK, you do not need (and probably should not) do the second if, no ?
> >
> > I was not sure about that.
> > Is it guaranteed that STATX_DIOALIGN returns something sane?
>
> If it is defined by the FS, yes. But it may not be defined, so in that case,
> you have to use the fallback of the bdev block size.
Ok!
LG,
//richard
--
sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr:
ATU 66964118 | FN: 374287y
next prev parent reply other threads:[~2025-07-01 17:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 19:13 [PATCH v2] nvmet: Make blksize_shift configurable Richard Weinberger
2025-07-01 0:34 ` Damien Le Moal
2025-07-01 7:09 ` Richard Weinberger
2025-07-01 7:32 ` Damien Le Moal
2025-07-01 15:00 ` Richard Weinberger [this message]
2025-07-03 8:54 ` Christoph Hellwig
2025-07-03 9:29 ` Richard Weinberger
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=3078386.UTt5R2Mg1o@nailgun \
--to=richard@sigma-star.at \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=kch@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=richard@nod.at \
--cc=sagi@grimberg.me \
--cc=upstream+nvme@sigma-star.at \
--cc=upstream@sigma-star.at \
/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.