common: set _fs_has_crcs=0 as default in _filter_mkfs()
authorEryu Guan <eguan@redhat.com>
Tue, 22 Apr 2014 00:46:17 +0000 (10:46 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 22 Apr 2014 00:46:17 +0000 (10:46 +1000)
commit7f783df2faf2dcffe44b0128ec80d501dcd803d7
treefc8fbef5297c74f627ec86b5726ac655b1278b0d
parentd37388c21b920fbe41468d1384633da6f0067d62
common: set _fs_has_crcs=0 as default in _filter_mkfs()

xfsprogs without crc support won't print crc=0/crc=1, so
_filter_mkfs() leaves _fs_has_crcs variable unset, and xfs/033 fails
because of that.

xfs/033 4s ... - output mismatch (see /root/xfstests/results//xfs/033.out.bad)
    --- tests/xfs/033.out       2014-04-16 22:31:49.818350450 -0400
    +++ /root/xfstests/results//xfs/033.out.bad 2014-04-16 22:35:08.264401190 -0400
    @@ -5,6 +5,7 @@
     naming   =VERN bsize=XXX
     log      =LDEV bsize=XXX blocks=XXX
     realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
    +./tests/xfs/033: line 87: [: -eq: unary operator expected
     Corrupting root inode - setting bits to 0
     Wrote X.XXKb (value 0x0)
     Phase 1 - find and verify superblock...

Print _fs_has_crcs=0 to stderr by default, so old xfsprogs could have
this variable set too, and a latter _fs_has_crcs=1 could overwrite it
if the fs does have crc support.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/filter