mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common/rc: factor out _scratch_xfs_[get|set]_sb_field
It's common to get and set the values of fields in XFS super block, so factor them out as scratch_xfs_[get|set]_sb_field, reimplement them based on _scratch_xfs_[get|set]_metadata_field, and update the related test cases accordingly. Also move _scratch_xfs_[get|set]_metadata_field from common/fuzzy to common/xfs. Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
+3
-3
@@ -59,9 +59,9 @@ ln $SCRATCH_MNT/f3 $SCRATCH_MNT/f4
|
||||
_scratch_unmount
|
||||
|
||||
echo "Corrupt fs"
|
||||
rrmapino=$(_scratch_xfs_db -c 'sb 0' -c 'p rrmapino' | awk '{print $3}')
|
||||
_scratch_xfs_db -x -c 'sb 0' -c 'addr rootino' \
|
||||
-c "write u3.sfdir3.list[3].inumber.i4 $rrmapino" >> $seqres.full
|
||||
rrmapino=`_scratch_xfs_get_sb_field rrmapino`
|
||||
_scratch_xfs_set_metadata_field "u3.sfdir3.list[3].inumber.i4" $rrmapino \
|
||||
'sb 0' 'addr rootino' >> $seqres.full
|
||||
_scratch_mount
|
||||
|
||||
echo "Check files"
|
||||
|
||||
Reference in New Issue
Block a user