From: Matthew Wilcox <willy@infradead.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: brauner@kernel.org, hare@suse.de, david@fromorbit.com,
djwong@kernel.org, kbusch@kernel.org, john.g.garry@oracle.com,
hch@lst.de, ritesh.list@gmail.com, linux-fsdevel@vger.kernel.org,
linux-block@vger.kernel.org, gost.dev@samsung.com,
p.raghav@samsung.com, da.gomez@samsung.com,
kernel@pankajraghav.com,
Kent Overstreet <kent.overstreet@linux.dev>
Subject: Re: [PATCH] bdev: add back PAGE_SIZE block size validation for sb_set_blocksize()
Date: Wed, 5 Mar 2025 06:04:21 +0000 [thread overview]
Message-ID: <Z8fpZWHNs8eI5g38@casper.infradead.org> (raw)
In-Reply-To: <20250305015301.1610092-1-mcgrof@kernel.org>
On Tue, Mar 04, 2025 at 05:53:01PM -0800, Luis Chamberlain wrote:
> The commit titled "block/bdev: lift block size restrictions to 64k"
> lifted the block layer's max supported block size to 64k inside the
> helper blk_validate_block_size() now that we support large folios.
> However in lifting the block size we also removed the silly use
> cases many filesystems have to use sb_set_blocksize() to *verify*
> that the block size < PAGE_SIZE. The call to sb_set_blocksize() can
> happen in-kernel given mkfs utilities *can* create for example an
> ext4 32k block size filesystem on x86_64, the issue we want to prevent
> is mounting it on x86_64 unless the filesystem supports LBS.
>
> While, we could argue that such checks should be filesystem specific,
> there are much more users of sb_set_blocksize() than LBS enabled
> filesystem on linux-next, so just do the easier thing and bring back
> the PAGE_SIZE check for sb_set_blocksize() users.
>
> This will ensure that tests such as generic/466 when run in a loop
> against say, ext4, won't try to try to actually mount a filesystem with
> a block size larger than your filesystem supports given your PAGE_SIZE
> and in the worst case crash.
So this is expedient because XFS happens to not call sb_set_blocksize()?
What is the path forward for filesystems which call sb_set_blocksize()
today and want to support LBS in future?
next prev parent reply other threads:[~2025-03-05 6:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 1:53 [PATCH] bdev: add back PAGE_SIZE block size validation for sb_set_blocksize() Luis Chamberlain
2025-03-05 6:04 ` Matthew Wilcox [this message]
2025-03-05 6:33 ` Darrick J. Wong
2025-03-05 14:15 ` Matthew Wilcox
2025-03-05 17:04 ` [PATCH] bdev: add back PAGE_SIZE block size validation for sb_set_blocksize()' Luis Chamberlain
2025-03-05 18:48 ` Darrick J. Wong
2025-03-05 19:55 ` Luis Chamberlain
2025-03-05 7:18 ` [PATCH] bdev: add back PAGE_SIZE block size validation for sb_set_blocksize() Hannes Reinecke
2025-03-05 17:05 ` Luis Chamberlain
2025-03-06 18:39 ` Kent Overstreet
2025-03-07 0:45 ` Luis Chamberlain
2025-03-07 1:43 ` Kent Overstreet
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=Z8fpZWHNs8eI5g38@casper.infradead.org \
--to=willy@infradead.org \
--cc=brauner@kernel.org \
--cc=da.gomez@samsung.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=gost.dev@samsung.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=john.g.garry@oracle.com \
--cc=kbusch@kernel.org \
--cc=kent.overstreet@linux.dev \
--cc=kernel@pankajraghav.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=p.raghav@samsung.com \
--cc=ritesh.list@gmail.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