field="$1"
shift
- xfs_db -c 'agf 1' "$@" -c "p $field" $SCRATCH_DEV | awk '{print $3}'
+ _scratch_xfs_db -c 'agf 1' "$@" -c "p $field" | awk '{print $3}'
}
_set_agf_data() {
value="$2"
shift; shift
- xfs_db -x -c 'agf 1' "$@" -c "write $field -- $value" $SCRATCH_DEV >> $seqres.full
+ _scratch_xfs_db -x -c 'agf 1' "$@" -c "write $field -- $value" >> $seqres.full
}
_get_sb_data() {
- field="$1"
- shift
-
- xfs_db -c 'sb 0' "$@" -c "p $field" $SCRATCH_DEV | awk '{print $3}'
+ _scratch_xfs_get_sb_field "$@"
}
_set_sb_data() {
- field="$1"
- value="$2"
- shift; shift
-
- xfs_db -x -c 'sb 0' "$@" -c "write $field -- $value" $SCRATCH_DEV >> $seqres.full
+ _scratch_xfs_set_sb_field "$@" >> $seqres.full
}
_filter_leftover() {
_dump_status() {
echo "** " "$@"
- xfs_db -c 'sb 0' -c p $SCRATCH_DEV
+ _scratch_xfs_db -c 'sb 0' -c p
echo "** agf header"
- xfs_db -c 'agf 1' -c p $SCRATCH_DEV
+ _scratch_xfs_db -c 'agf 1' -c p
echo "** refcntbt"
- xfs_db -c 'agf 1' -c 'addr refcntroot' -c p $SCRATCH_DEV
+ _scratch_xfs_db -c 'agf 1' -c 'addr refcntroot' -c p
echo "** rmapbt"
- test $is_rmap -gt 0 && xfs_db -c 'agf 1' -c 'addr rmaproot' -c p $SCRATCH_DEV
+ test $is_rmap -gt 0 && _scratch_xfs_db -c 'agf 1' -c 'addr rmaproot' -c p
echo "** bnobt"
- xfs_db -c 'agf 1' -c 'addr bnoroot' -c p $SCRATCH_DEV
+ _scratch_xfs_db -c 'agf 1' -c 'addr bnoroot' -c p
echo "** cntbt"
- xfs_db -c 'agf 1' -c 'addr cntroot' -c p $SCRATCH_DEV
+ _scratch_xfs_db -c 'agf 1' -c 'addr cntroot' -c p
}
echo "We need AG1 to have a single free extent"