xfs
[Top] [All Lists]

[PATCH 1/3] common: set _fs_has_crcs=0 as default in _filter_mkfs()

To: xfs@xxxxxxxxxxx
Subject: [PATCH 1/3] common: set _fs_has_crcs=0 as default in _filter_mkfs()
From: Eryu Guan <eguan@xxxxxxxxxx>
Date: Thu, 17 Apr 2014 12:16:52 +0800
Cc: Eryu Guan <eguan@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
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@xxxxxxxxxx>
---
 common/filter | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/filter b/common/filter
index a7d2aa9..05dbae6 100644
--- a/common/filter
+++ b/common/filter
@@ -143,6 +143,7 @@ _filter_mkfs()
        return ;;
     esac
 
+    echo "_fs_has_crcs=0" >&2
     set -
     perl -ne '
     if (/^meta-data=([\w,|\/.-]+)\s+isize=(\d+)\s+agcount=(\d+), agsize=(\d+) 
blks/) {
-- 
1.9.0

<Prev in Thread] Current Thread [Next in Thread>