]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
mkfs.xfs: don't call blkid_get_topology on existing regular files
authorEric Sandeen <sandeen@sandeen.net>
Thu, 19 Jun 2014 02:11:20 +0000 (12:11 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 19 Jun 2014 02:11:20 +0000 (12:11 +1000)
commit3800a2a23d1a9af666421eac5fd4a4e3f5e042ec
tree14f2e4708668137853b760e8e85b161804571984
parent5a7d5937f375a14c00496544eec1e0b4a79822c8
mkfs.xfs: don't call blkid_get_topology on existing regular files

If we encounter a target that's really a regular file,
even without "-d file..." on the cmdline, call
platform_findsizes() instead of blkid_get_topology to
try to discover the "sector size" via the fsgeom() call.

Otherwise mkfs.xfs will try to do direct IO with a default
512 sector size, and if the underlying file has different
DIO requirements, mkfs will fail.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
mkfs/xfs_mkfs.c