Skip to contentSkip to conversation

xfs/288: use -d option of xfs_db write command for v5 XFS

PATCH Superseded Zorro Lang 2 participants 2 messages Jul 29, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

PATCH 1/1 xfs/288: use -d option of xfs_db write command for v5 XFS

The commit b3cf8b72334fd35ef961869506e5a72ab398bc82 update xfs/288 to support v5 filesystem testing. That commit thought xfs_db write command can work well with -d option on V5 XFS. But the truth is the case doesn't use that option.

So turn to use _scratch_xfs_set_metadata_field, it will help to use proper options for xfs_db write command.

---

Hi,

Missing '-d' option is a case issue. But from this issue, we found another bug of xfsprogs. On current upstream, this case will test pass on v5 XFS, even there's not '-d' option for write command.

That's a bug, we'll fix it later. For now, I'd like to fix this case issue at first.

Thanks,
Zorro

 tests/xfs/288 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
tests/xfs/288 +2 -3
index bccdb6fc..f4165b6c 100755
@@ -56,9 +56,8 @@ $SETFATTR_PROG -n "user.testattr${seq}" \
 
 _scratch_unmount
 # manually corrupt the XFS, by set the header count of attr to 0
-_scratch_xfs_db -x -c "inode $inum" \
-		   -c "ablock 0" \
-		   -c "write hdr.count 0" >> $seqres.full
+_scratch_xfs_set_metadata_field "hdr.count" "0" \
+				"inode $inum" "ablock 0" >> $seqres.full
 
 # make sure xfs_repair can find above corruption. If it can't, that
 # means we need to fix this bug on current xfs_repair
Signature · 1 line
2.14.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Zorro Lang

The commit b3cf8b72334fd35ef961869506e5a72ab398bc82 update xfs/288 to support v5 filesystem testing. That commit thought xfs_db write command can work well with -d option on V5 XFS. But the truth is the case doesn't use that option.

So turn to use _scratch_xfs_set_metadata_field, it will help to use proper options for xfs_db write command.

Looks like a reasonable replacement,

--D

Quoted 40 lines

---

Hi,

Missing '-d' option is a case issue. But from this issue, we found another bug of xfsprogs. On current upstream, this case will test pass on v5 XFS, even there's not '-d' option for write command.

That's a bug, we'll fix it later. For now, I'd like to fix this case issue at first.

Thanks,
Zorro

 tests/xfs/288 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
tests/xfs/288 +2 -3
index bccdb6fc..f4165b6c 100755
@@ -56,9 +56,8 @@ $SETFATTR_PROG -n "user.testattr${seq}" \
 
 _scratch_unmount
 # manually corrupt the XFS, by set the header count of attr to 0
-_scratch_xfs_db -x -c "inode $inum" \
-		   -c "ablock 0" \
-		   -c "write hdr.count 0" >> $seqres.full
+_scratch_xfs_set_metadata_field "hdr.count" "0" \
+				"inode $inum" "ablock 0" >> $seqres.full
 
 # make sure xfs_repair can find above corruption. If it can't, that
 # means we need to fix this bug on current xfs_repair
Signature · 6 lines
2.14.4

--
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