Skip to contentSkip to conversation

xfs/187: fix ftype brokenness

PATCH In review Darrick J. Wong 2 participants 3 messages Apr 11, 2018 – Apr 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs/187: fix ftype brokenness

From: Darrick J. Wong <[email protected]>

This test requires XFS_SB_VERSION_MOREBITSBIT to be zero. ftype (which is now enabled by default) causes this to be set, so detect it in mkfs and disable it.

---
 tests/xfs/187 |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
tests/xfs/187 +8 -2
index 07ef3ae..e1a8ce9 100755
@@ -70,8 +70,14 @@ export MOUNT_OPTIONS=""
 # lazysb, attr2 and other feature bits are held in features2 and will require
 # morebitsbit on So test with lazysb and without it to see if the morebitsbit is
 # okay etc. If the mkfs defaults change, these need to change as well.
-export MKFS_NO_LAZY="-m crc=0 -l lazy-count=0 -i projid32bit=0"
-export MKFS_LAZY="-m crc=0 -l lazy-count=1 -i projid32bit=0"
+MKFS_NO_LAZY="-m crc=0 -l lazy-count=0 -i projid32bit=0"
+MKFS_LAZY="-m crc=0 -l lazy-count=1 -i projid32bit=0"
+
+# Detect ftype
+if _scratch_mkfs --help 2>&1 | grep -q "ftype="; then
+	MKFS_NO_LAZY="$MKFS_NO_LAZY -n ftype=0"
+	MKFS_LAZY="$MKFS_LAZY -n ftype=0"
+fi
 
 # Make sure that when we think we are testing with morebits off
 # that we really are.
#1 lore raw
Quoted 16 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

This test requires XFS_SB_VERSION_MOREBITSBIT to be zero. ftype (which is now enabled by default) causes this to be set, so detect it in mkfs and disable it.

---
 tests/xfs/187 |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
tests/xfs/187 +0 -0
index 07ef3ae..e1a8ce9 100755

tests/xfs/187 export MOUNT_OPTIONS="" · line 76

Quoted 9 lines
tests/xfs/187 +4 -2
@@ -70,8 +70,14 @@ export MOUNT_OPTIONS=""
 # lazysb, attr2 and other feature bits are held in features2 and will require
 # morebitsbit on So test with lazysb and without it to see if the morebitsbit is
 # okay etc. If the mkfs defaults change, these need to change as well.
-export MKFS_NO_LAZY="-m crc=0 -l lazy-count=0 -i projid32bit=0"
-export MKFS_LAZY="-m crc=0 -l lazy-count=1 -i projid32bit=0"
+MKFS_NO_LAZY="-m crc=0 -l lazy-count=0 -i projid32bit=0"
+MKFS_LAZY="-m crc=0 -l lazy-count=1 -i projid32bit=0"
+
+# Detect ftype

I'd put the reason of detecting ftype support in comments here. I can fix it on commit.

Thanks,
Eryu

Quoted 7 lines
tests/xfs/187 +4 -0
+if _scratch_mkfs --help 2>&1 | grep -q "ftype="; then
+	MKFS_NO_LAZY="$MKFS_NO_LAZY -n ftype=0"
+	MKFS_LAZY="$MKFS_LAZY -n ftype=0"
+fi
 
 # Make sure that when we think we are testing with morebits off
 # that we really are.
#2 lore raw
Quoted 21 lines · Eryu Guan
Quoted 20 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

This test requires XFS_SB_VERSION_MOREBITSBIT to be zero. ftype (which is now enabled by default) causes this to be set, so detect it in mkfs and disable it.

---
 tests/xfs/187 |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
tests/xfs/187 +0 -1
index 07ef3ae..e1a8ce9 100755
@@ -70,8 +70,14 @@ export MOUNT_OPTIONS=""
 # lazysb, attr2 and other feature bits are held in features2 and will require
 # morebitsbit on So test with lazysb and without it to see if the morebitsbit is
 # okay etc. If the mkfs defaults change, these need to change as well.
-export MKFS_NO_LAZY="-m crc=0 -l lazy-count=0 -i projid32bit=0"
Quoted 8 lines

tests/xfs/187 export MOUNT_OPTIONS="" · line 76

Quoted 5 lines
tests/xfs/187 +4 -1
-export MKFS_LAZY="-m crc=0 -l lazy-count=1 -i projid32bit=0"
+MKFS_NO_LAZY="-m crc=0 -l lazy-count=0 -i projid32bit=0"
+MKFS_LAZY="-m crc=0 -l lazy-count=1 -i projid32bit=0"
+
+# Detect ftype

I'd put the reason of detecting ftype support in comments here. I can fix it on commit.

Ok.

# ftype is also stored in features2, so we have to detect its presence in
# mkfs and disable it here too.

?

--D

Quoted 14 lines

Thanks,
Eryu

tests/xfs/187 export MOUNT_OPTIONS="" · line 83

Quoted 7 lines
tests/xfs/187 +4 -0
+if _scratch_mkfs --help 2>&1 | grep -q "ftype="; then
+	MKFS_NO_LAZY="$MKFS_NO_LAZY -n ftype=0"
+	MKFS_LAZY="$MKFS_LAZY -n ftype=0"
+fi
 
 # Make sure that when we think we are testing with morebits off
 # that we really are.

--
To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html