]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
mkfs.xfs: fix ftype-vs-crc option combination testing
authorEric Sandeen <sandeen@sandeen.net>
Tue, 18 Aug 2015 07:53:17 +0000 (17:53 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 18 Aug 2015 07:53:17 +0000 (17:53 +1000)
commitb990de8ba4e2df2bc76a140799d3ddb4a0eac4ce
tree5cc622ba2b86c6052e11ac32465ee181f8ee643e
parent237cb370a21f44218bc5f2d7a445e401ab93279c
mkfs.xfs: fix ftype-vs-crc option combination testing

mkfs.xfs got weird along the way; today it has different outcomes
depending on the order of option specification:

$ mkfs/mkfs.xfs -n ftype=1 -m crc=0 -dfile,name=fsfile,size=16g
cannot specify both crc and ftype
$ mkfs/mkfs.xfs -m crc=0 -n ftype=1 -dfile,name=fsfile,size=16g
<succeeds>

Somehow the tests got written as being constrained on what options
are specified - and in what order! - vs actually testing for
incompatible feature sets.

It's fine to specify both crc & ftype options, as long as it's an
allowed combination, so just test for the incompatible combination
(crc=1 and ftype=0) after all options have been processed.

[dchinner: fix dirftype init value so mkfs default config works]

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