On Wed, Jun 18, 2025 at 09:40:20AM +1000, Dave Chinner wrote: > On Tue, Jun 17, 2025 at 12:52:01PM +0200, Christoph Hellwig wrote: > > All checks the checks done in bdev_validate_blocksize are already > > performed in xfs_readsb and xfs_validate_sb_common. > > For the data device, yes. I don't obviously see anywhere else that > we check the fs external log dev or rt device sector size against > the block device sector size, so unless I'm just being blind it > seems to me that this check in xfs_configure_buftarg() is still > necessary for those devices. bdev_validate_blocksize does two things: - call blk_validate_block_size to enure the passed in block size is a power of two, > 512 bytes and < BLK_MAX_BLOCK_SIZE - check that the passed in size is larger than the sector size In xfs_setup_devices both the main and RT device pass sb_sectsize, so the first part is common for them, the log device passes either BBSIZE or sb_logsectsize. XFS verifies the is power of two for both sb fields. The BLK_MAX_BLOCK_SIZE is not relevant as we don't set the block size in the block layer. But yes, we are missing the XFS (log)sectorsize >= lba size check for the RT and log device, I'll fix it up.