]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
mkfs: use a default sector size that is also suitable for the rtdev
authorChristoph Hellwig <hch@lst.de>
Mon, 27 Jan 2025 13:54:03 +0000 (14:54 +0100)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 29 Jan 2025 09:32:10 +0000 (10:32 +0100)
commitc988ff56258abf338bf0403323cfe0a4d173de3a
treee71427306d9cdd572e15acbc759acc20e138fd45
parentff12f3956648a03b89a270a8a4a2236e570be6f8
mkfs: use a default sector size that is also suitable for the rtdev

When creating a filesytem where the data device has a sector size
smalle than that of the RT device without further options, mkfs
currently fails with:

mkfs.xfs: error - cannot set blocksize 512 on block device $RTDEV: Invalid argument

This is because XFS sets the sector size based on logical block size
of the data device, but not that of the RT device.  Change the code
so that is uses the larger of the two values.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
mkfs/xfs_mkfs.c