[PATCH] mkfs.xfs: fix ftype-vs-crc option combination testing
Eric Sandeen
sandeen at sandeen.net
Tue Aug 18 10:36:47 CDT 2015
On 8/18/15 1:53 AM, Dave Chinner wrote:
> On Thu, Aug 06, 2015 at 10:18:50PM -0700, Eric Sandeen wrote:
>> 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.
>>
>> Signed-off-by: Eric Sandeen <sandeen at redhat.com>
>
> Did you test this, Eric?
Yep...
> $ mkfs.xfs /dev/sdc
> cannot disable ftype with crcs enabled
> Usage: mkfs.xfs
> /* blocksize */ [-b log=n|size=num]
> .....
God, but not with defaults! I tested w/ all combinations of ftype/crc specified. :(
...
> So we enable crcs by default and do not enable dirftype/nftype by
> default, and so by default mkfs now fails. I'll fix it to always
> default to ftype=1 for both v4 and v5 filesystems as there is no go
> reason not to enable it.
Hell. Sorry about that. Thanks for catching ...
Thanks,
-Eric
More information about the xfs
mailing list