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?