]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
mkfs.xfs: properly handle physical sector size
authorEric Sandeen <sandeen@sandeen.net>
Fri, 2 Mar 2012 04:46:35 +0000 (22:46 -0600)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 2 Mar 2012 04:46:35 +0000 (22:46 -0600)
commit287d168b550857ce40e04b5f618d7eb91b87022f
tree654e65ae025991415e712c598e8822b1e60a22ee
parent1bc7dfb22c8179580e5223f2c6194803478d769b
mkfs.xfs: properly handle physical sector size

This splits the fs_topology structure "sectorsize" into
logical & physical, and gets both via blkid_get_topology().

This primarily allows us to default to using the physical
sectorsize for mkfs's "sector size" value, the fundamental
size of any IOs the filesystem will perform.

We reduce mkfs.xfs's "sector size" to logical if
a block size < physical sector size is specified.
This is suboptimal, but permissable.

For block size < sector size, differentiate the error
message based on whether the sector size was manually
specified, or deduced.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
mkfs/xfs_mkfs.c