]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
mkfs: use a sensible log sector size default
authorChristoph Hellwig <hch@lst.de>
Mon, 15 Apr 2024 23:07:47 +0000 (16:07 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 17 Apr 2024 21:06:27 +0000 (14:06 -0700)
commit53bf0604e104bc053778495faef94b3570582aac
tree13c13e9133dd0b685bbec914db549bfcc7d94410
parent258dd18d19f17f81345dad4f3d86af742fc72809
mkfs: use a sensible log sector size default

Currently the XFS log sector size defaults to the 512 bytes unless
explicitly overriden.  Default to the device logical block size queried
by get_topology instead.  If that is also 512 nothing changes, and if
the device logical block size is larger this prevents a mkfs failure
because the libxfs buffer cache blows up and as we obviously can't
use a smaller than hardware supported sector size.  This fixes xfs/157
with a 4k block size device.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Tested-by: Pankaj Raghav <p.raghav@samsung.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
mkfs/xfs_mkfs.c