* [NYE DELUGE 4/4] xfs: freespace defrag for online shrink
@ 2022-12-30 21:14 Darrick J. Wong
2022-12-30 22:21 ` [PATCHSET 0/1] xfs_scrub: vectorize kernel calls Darrick J. Wong
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Darrick J. Wong @ 2022-12-30 21:14 UTC (permalink / raw)
To: djwong; +Cc: xfs, fstests
Hi all,
This fourth patch deluge has two faces -- one way of looking at it is
that it is random odds and ends at the tail of my development tree. A
second interpretation is that it is necessary pieces for defragmenting
free space, which is a precursor for online shrink of XFS filesystems.
The kernel side isn't that exciting -- we export refcounting information
for space extents, and add a new fallocate mode for mapping exact
portions of free filesystem space into a file.
Userspace is where things get interesting! The free space defragmenter
is an iterative algorithm that assigns free space to a dummy file, and
then uses the GETFSMAP and GETFSREFCOUNTS information to target file
space extents in order of decreasing share counts. Once an extent has
been targeted, it uses reflinking to freeze the space, copies it
elsewhere, and uses FIDEDUPERANGE to remap existing file data until the
dummy file is the sole owner of the targetted space. If metadata are
involved, the defrag utility invokes online repair to rebuild the
metadata somewhere else.
When the defragmenter finishes, all the free space has been isolated to
the dummy file, which can be unlinked and closed if defragmentation was
the goal; or it could be passed to a shrinkfs operation.
NOTE: There's also an experimental vectorization interface for scrub.
Given how long it's likely to take to get to this fourth deluge, it
might make more sense to integrate with io_uring when that day comes.
As a warning, the patches will likely take several days to trickle in.
--D
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCHSET 0/1] xfs_scrub: vectorize kernel calls
2022-12-30 21:14 [NYE DELUGE 4/4] xfs: freespace defrag for online shrink Darrick J. Wong
@ 2022-12-30 22:21 ` Darrick J. Wong
2022-12-30 22:21 ` [PATCH 1/1] xfs/122: update for vectored scrub Darrick J. Wong
2022-12-30 22:21 ` [PATCHSET 0/1] fstests: functional test for refcount reporting Darrick J. Wong
2022-12-30 22:21 ` [PATCHSET 0/1] fstests: defragment free space Darrick J. Wong
2 siblings, 1 reply; 7+ messages in thread
From: Darrick J. Wong @ 2022-12-30 22:21 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-xfs, fstests, guan
Hi all,
Create a vectorized version of the metadata scrub and repair ioctl, and
adapt xfs_scrub to use that. This is an experiment to measure overhead
and to try refactoring xfs_scrub.
If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.
This is an extraordinary way to destroy everything. Enjoy!
Comments and questions are, as always, welcome.
--D
kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=vectorized-scrub
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=vectorized-scrub
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=vectorized-scrub
---
tests/xfs/122.out | 2 ++
1 file changed, 2 insertions(+)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/1] xfs/122: update for vectored scrub
2022-12-30 22:21 ` [PATCHSET 0/1] xfs_scrub: vectorize kernel calls Darrick J. Wong
@ 2022-12-30 22:21 ` Darrick J. Wong
0 siblings, 0 replies; 7+ messages in thread
From: Darrick J. Wong @ 2022-12-30 22:21 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-xfs, fstests, guan
From: Darrick J. Wong <djwong@kernel.org>
Add the two new vectored scrub structures.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
tests/xfs/122.out | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/xfs/122.out b/tests/xfs/122.out
index 3239a655f9..43461e875c 100644
--- a/tests/xfs/122.out
+++ b/tests/xfs/122.out
@@ -126,6 +126,8 @@ sizeof(struct xfs_rtsb) = 104
sizeof(struct xfs_rud_log_format) = 16
sizeof(struct xfs_rui_log_format) = 16
sizeof(struct xfs_scrub_metadata) = 64
+sizeof(struct xfs_scrub_vec) = 16
+sizeof(struct xfs_scrub_vec_head) = 24
sizeof(struct xfs_swap_extent) = 64
sizeof(struct xfs_sxd_log_format) = 16
sizeof(struct xfs_sxi_log_format) = 80
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCHSET 0/1] fstests: functional test for refcount reporting
2022-12-30 21:14 [NYE DELUGE 4/4] xfs: freespace defrag for online shrink Darrick J. Wong
2022-12-30 22:21 ` [PATCHSET 0/1] xfs_scrub: vectorize kernel calls Darrick J. Wong
@ 2022-12-30 22:21 ` Darrick J. Wong
2022-12-30 22:21 ` [PATCH 1/1] xfs: test output of new FSREFCOUNTS ioctl Darrick J. Wong
2022-12-30 22:21 ` [PATCHSET 0/1] fstests: defragment free space Darrick J. Wong
2 siblings, 1 reply; 7+ messages in thread
From: Darrick J. Wong @ 2022-12-30 22:21 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-xfs, fstests, guan
Hi all,
Add a short functional test for the new GETFSREFCOUNTS ioctl that allows
userspace to query reference count information for a given range of
physical blocks.
If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.
This is an extraordinary way to destroy everything. Enjoy!
Comments and questions are, as always, welcome.
--D
kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=report-refcounts
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=report-refcounts
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=report-refcounts
---
common/rc | 4 +
doc/group-names.txt | 1
tests/xfs/921 | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++
tests/xfs/921.out | 4 +
4 files changed, 175 insertions(+), 2 deletions(-)
create mode 100755 tests/xfs/921
create mode 100644 tests/xfs/921.out
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/1] xfs: test output of new FSREFCOUNTS ioctl
2022-12-30 22:21 ` [PATCHSET 0/1] fstests: functional test for refcount reporting Darrick J. Wong
@ 2022-12-30 22:21 ` Darrick J. Wong
0 siblings, 0 replies; 7+ messages in thread
From: Darrick J. Wong @ 2022-12-30 22:21 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-xfs, fstests, guan
From: Darrick J. Wong <djwong@kernel.org>
Make sure the cursors work properly and that refcounts are correct.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
common/rc | 4 +
doc/group-names.txt | 1
tests/xfs/921 | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++
tests/xfs/921.out | 4 +
4 files changed, 175 insertions(+), 2 deletions(-)
create mode 100755 tests/xfs/921
create mode 100644 tests/xfs/921.out
diff --git a/common/rc b/common/rc
index 3c30a444fe..20fe51f502 100644
--- a/common/rc
+++ b/common/rc
@@ -2543,8 +2543,8 @@ _require_xfs_io_command()
echo $testio | grep -q "Operation not supported" && \
_notrun "O_TMPFILE is not supported"
;;
- "fsmap")
- testio=`$XFS_IO_PROG -f -c "fsmap" $testfile 2>&1`
+ "fsmap"|"fsrefcounts")
+ testio=`$XFS_IO_PROG -f -c "$command" $testfile 2>&1`
echo $testio | grep -q "Inappropriate ioctl" && \
_notrun "xfs_io $command support is missing"
;;
diff --git a/doc/group-names.txt b/doc/group-names.txt
index e88dcc0fdd..8bcf21919b 100644
--- a/doc/group-names.txt
+++ b/doc/group-names.txt
@@ -56,6 +56,7 @@ freeze filesystem freeze tests
fsck general fsck tests
fsmap FS_IOC_GETFSMAP ioctl
fsr XFS free space reorganizer
+fsrefcounts FS_IOC_GETFSREFCOUNTS ioctl
fuzzers filesystem fuzz tests
growfs increasing the size of a filesystem
hardlink hardlinks
diff --git a/tests/xfs/921 b/tests/xfs/921
new file mode 100755
index 0000000000..bc9894b1d7
--- /dev/null
+++ b/tests/xfs/921
@@ -0,0 +1,168 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2021, Oracle and/or its affiliates. All Rights Reserved.
+#
+# FS QA Test No. 921
+#
+# Populate filesystem, check that fsrefcounts -n10000 matches fsrefcounts -n1,
+# then verify that the refcount information is consistent with the fsmap info.
+#
+. ./common/preamble
+_begin_fstest auto clone fsrefcounts fsmap
+
+# Override the default cleanup function.
+_cleanup()
+{
+ cd /
+ rm -rf $tmp.* $TEST_DIR/a $TEST_DIR/b
+}
+
+# Import common functions.
+. ./common/filter
+
+# real QA test starts here
+_supported_fs xfs
+_require_scratch
+_require_xfs_io_command "fsmap"
+_require_xfs_io_command "fsrefcounts"
+
+echo "Format and mount"
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+
+cpus=$(( $(src/feature -o) * 4))
+
+# Use fsstress to create a directory tree with some variability
+FSSTRESS_ARGS=$(_scale_fsstress_args -p 4 -d $SCRATCH_MNT -n 4000 $FSSTRESS_AVOID)
+$FSSTRESS_PROG $FSSTRESS_ARGS >> $seqres.full
+
+echo "Compare fsrefcounts" | tee -a $seqres.full
+$XFS_IO_PROG -c 'fsrefcounts -m -n 65536' $SCRATCH_MNT | grep -v 'EXT:' > $TEST_DIR/a
+$XFS_IO_PROG -c 'fsrefcounts -m -n 1' $SCRATCH_MNT | grep -v 'EXT:' > $TEST_DIR/b
+cat $TEST_DIR/a $TEST_DIR/b >> $seqres.full
+
+diff -uw $TEST_DIR/a $TEST_DIR/b
+
+echo "Compare fsrefcounts to fsmap" | tee -a $seqres.full
+$XFS_IO_PROG -c 'fsmap -m -n 65536' $SCRATCH_MNT | grep -v 'EXT:' > $TEST_DIR/b
+cat $TEST_DIR/b >> $seqres.full
+
+while IFS=',' read ext major minor pstart pend owners length crap; do
+ test "$ext" = "EXT" && continue
+
+ awk_args=(-'F' ',' '-v' "major=$major" '-v' "minor=$minor" \
+ '-v' "pstart=$pstart" '-v' "pend=$pend" '-v' "owners=$owners")
+
+ if [ "$owners" -eq 1 ]; then
+ $AWK_PROG "${awk_args[@]}" \
+'
+BEGIN {
+ printf("Q:%s:%s:%s:%s:%s:\n", major, minor, pstart, pend, owners) > "/dev/stderr";
+ next_map = -1;
+}
+{
+ if ($2 != major || $3 != minor) {
+ next;
+ }
+ if ($5 <= pstart) {
+ next;
+ }
+
+ printf(" A:%s:%s:%s:%s\n", $2, $3, $4, $5) > "/dev/stderr";
+ if (next_map < 0) {
+ if ($4 > pstart) {
+ exit 1
+ }
+ next_map = $5 + 1;
+ } else {
+ if ($4 != next_map) {
+ exit 1
+ }
+ next_map = $5 + 1;
+ }
+ if (next_map >= pend) {
+ nextfile;
+ }
+}
+END {
+ exit 0;
+}
+' $TEST_DIR/b 2> $tmp.debug
+ res=$?
+ else
+ $AWK_PROG "${awk_args[@]}" \
+'
+function max(a, b) {
+ return a > b ? a : b;
+}
+function min(a, b) {
+ return a < b ? a : b;
+}
+BEGIN {
+ printf("Q:%s:%s:%s:%s:%s:\n", major, minor, pstart, pend, owners) > "/dev/stderr";
+ refcount_whole = 0;
+ aborted = 0;
+}
+{
+ if ($2 != major || $3 != minor) {
+ next;
+ }
+ if ($4 >= pend) {
+ nextfile;
+ }
+ if ($5 <= pstart) {
+ next;
+ }
+ if ($6 == "special_0:2") {
+ /* unknown owner means we cannot distinguish separate owners */
+ aborted = 1;
+ exit 0;
+ }
+
+ printf(" A:%s:%s:%s:%s -> %d\n", $2, $3, $4, $5, refcount_whole) > "/dev/stderr";
+ if ($4 <= pstart && $5 >= pend) {
+ /* Account for extents that span the whole range */
+ refcount_whole++;
+ } else {
+ /* Otherwise track refcounts per-block as we find them */
+ for (block = max($4, pstart); block <= min($5, pend); block++) {
+ refcounts[block]++;
+ }
+ }
+}
+END {
+ if (aborted) {
+ exit 0;
+ }
+ deficit = owners - refcount_whole;
+ printf(" W:%d:%d\n", owners, refcount_whole, deficit) > "/dev/stderr";
+ if (deficit == 0) {
+ exit 0;
+ }
+
+ refcount_slivers = 0;
+ for (block in refcounts) {
+ printf(" X:%s:%d\n", block, refcounts[block]) > "/dev/stderr";
+ if (refcounts[block] == deficit) {
+ refcount_slivers = deficit;
+ } else {
+ exit 1;
+ }
+ }
+
+ refcount_whole += refcount_slivers;
+ exit owners == refcount_whole ? 0 : 1;
+}
+' $TEST_DIR/b 2> $tmp.debug
+ res=$?
+ fi
+ if [ $res -ne 0 ]; then
+ echo "$major,$minor,$pstart,$pend,$owners not found in fsmap"
+ cat $tmp.debug >> $seqres.full
+ break
+ fi
+done < $TEST_DIR/a
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/921.out b/tests/xfs/921.out
new file mode 100644
index 0000000000..a181d357cd
--- /dev/null
+++ b/tests/xfs/921.out
@@ -0,0 +1,4 @@
+QA output created by 921
+Format and mount
+Compare fsrefcounts
+Compare fsrefcounts to fsmap
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCHSET 0/1] fstests: defragment free space
2022-12-30 21:14 [NYE DELUGE 4/4] xfs: freespace defrag for online shrink Darrick J. Wong
2022-12-30 22:21 ` [PATCHSET 0/1] xfs_scrub: vectorize kernel calls Darrick J. Wong
2022-12-30 22:21 ` [PATCHSET 0/1] fstests: functional test for refcount reporting Darrick J. Wong
@ 2022-12-30 22:21 ` Darrick J. Wong
2022-12-30 22:21 ` [PATCH 1/1] xfs: test clearing of " Darrick J. Wong
2 siblings, 1 reply; 7+ messages in thread
From: Darrick J. Wong @ 2022-12-30 22:21 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-xfs, fstests, guan
Hi all,
These patches contain experimental code to enable userspace to defragment
the free space in a filesystem. Two purposes are imagined for this
functionality: clearing space at the end of a filesystem before
shrinking it, and clearing free space in anticipation of making a large
allocation.
The first patch adds a new fallocate mode that allows userspace to
allocate free space from the filesystem into a file. The goal here is
to allow the filesystem shrink process to prevent allocation from a
certain part of the filesystem while a free space defragmenter evacuates
all the files from the doomed part of the filesystem.
The second patch amends the online repair system to allow the sysadmin
to forcibly rebuild metadata structures, even if they're not corrupt.
Without adding an ioctl to move metadata btree blocks, this is the only
way to dislodge metadata.
If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.
This is an extraordinary way to destroy everything. Enjoy!
Comments and questions are, as always, welcome.
--D
kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=defrag-freespace
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=defrag-freespace
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=defrag-freespace
---
common/rc | 2 +
tests/xfs/1400 | 57 +++++++++++++++++++++++++++++++++++++
tests/xfs/1400.out | 2 +
tests/xfs/1401 | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/xfs/1401.out | 2 +
5 files changed, 142 insertions(+), 1 deletion(-)
create mode 100755 tests/xfs/1400
create mode 100644 tests/xfs/1400.out
create mode 100755 tests/xfs/1401
create mode 100644 tests/xfs/1401.out
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/1] xfs: test clearing of free space
2022-12-30 22:21 ` [PATCHSET 0/1] fstests: defragment free space Darrick J. Wong
@ 2022-12-30 22:21 ` Darrick J. Wong
0 siblings, 0 replies; 7+ messages in thread
From: Darrick J. Wong @ 2022-12-30 22:21 UTC (permalink / raw)
To: djwong, zlang; +Cc: linux-xfs, fstests, guan
From: Darrick J. Wong <djwong@kernel.org>
Simple regression test for the spaceman clearspace command, which tries
to free all the used space in some part of the filesystem.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
common/rc | 2 +
tests/xfs/1400 | 57 +++++++++++++++++++++++++++++++++++++
tests/xfs/1400.out | 2 +
tests/xfs/1401 | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/xfs/1401.out | 2 +
5 files changed, 142 insertions(+), 1 deletion(-)
create mode 100755 tests/xfs/1400
create mode 100644 tests/xfs/1400.out
create mode 100755 tests/xfs/1401
create mode 100644 tests/xfs/1401.out
diff --git a/common/rc b/common/rc
index 20fe51f502..bf1d0ded39 100644
--- a/common/rc
+++ b/common/rc
@@ -2512,7 +2512,7 @@ _require_xfs_io_command()
testio=`$XFS_IO_PROG -F -f -c "$command $param 0 1m" $testfile 2>&1`
param_checked="$param"
;;
- "fpunch" | "fcollapse" | "zero" | "fzero" | "finsert" | "funshare")
+ "fpunch" | "fcollapse" | "zero" | "fzero" | "finsert" | "funshare" | "fmapfree")
local blocksize=$(_get_file_block_size $TEST_DIR)
testio=`$XFS_IO_PROG -F -f -c "pwrite 0 $((5 * $blocksize))" \
-c "fsync" -c "$command $blocksize $((2 * $blocksize))" \
diff --git a/tests/xfs/1400 b/tests/xfs/1400
new file mode 100755
index 0000000000..c054bf6ed7
--- /dev/null
+++ b/tests/xfs/1400
@@ -0,0 +1,57 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022 Oracle. All Rights Reserved.
+#
+# FS QA Test 1400
+#
+# Basic functionality testing for FALLOC_FL_MAP_FREE
+#
+. ./common/preamble
+_begin_fstest auto prealloc
+
+# Import common functions.
+. ./common/filter
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs generic
+_require_scratch
+_require_xfs_io_command "fmapfree"
+
+_scratch_mkfs | _filter_mkfs 2> $tmp.mkfs > /dev/null
+_scratch_mount >> $seqres.full
+. $tmp.mkfs
+
+testfile="$SCRATCH_MNT/$seq.txt"
+touch $testfile
+if $XFS_IO_PROG -c 'stat -v' $testfile | grep -q 'realtime'; then
+ # realtime
+ increment=$((dbsize * rtblocks / 10))
+ length=$((dbsize * rtblocks))
+else
+ # data
+ increment=$((dbsize * dblocks / 10))
+ length=$((dbsize * dblocks))
+fi
+
+free_bytes=$(stat -f -c '%f * %S' $testfile | bc)
+
+echo "free space: $free_bytes; increment: $increment; length: $length" >> $seqres.full
+
+# Map all the free space on that device, 10% at a time
+for ((start = 0; start < length; start += increment)); do
+ $XFS_IO_PROG -f -c "fmapfree $start $increment" $testfile
+done
+
+space_used=$(stat -c '%b * %B' $testfile | bc)
+
+echo "space captured: $space_used" >> $seqres.full
+$FILEFRAG_PROG -v $testfile >> $seqres.full
+
+# Did we get within 10% of the free space?
+_within_tolerance "mapfree space used" $space_used $free_bytes 10% -v
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/1400.out b/tests/xfs/1400.out
new file mode 100644
index 0000000000..601404d7a4
--- /dev/null
+++ b/tests/xfs/1400.out
@@ -0,0 +1,2 @@
+QA output created by 1400
+mapfree space used is in range
diff --git a/tests/xfs/1401 b/tests/xfs/1401
new file mode 100755
index 0000000000..8c0a545858
--- /dev/null
+++ b/tests/xfs/1401
@@ -0,0 +1,80 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022 Oracle. All Rights Reserved.
+#
+# FS QA Test No. 1401
+#
+# Basic functionality testing for the free space defragmenter.
+#
+. ./common/preamble
+_begin_fstest auto defrag shrinkfs
+
+# Override the default cleanup function.
+# _cleanup()
+# {
+# cd /
+# rm -r -f $tmp.*
+# }
+
+# Import common functions.
+. ./common/filter
+
+# real QA test starts here
+
+_notrun "XXX test is not ready yet; you need to deal with tail blocks"
+
+# Modify as appropriate.
+_supported_fs generic
+_require_scratch
+_require_xfs_spaceman_command "clearfree"
+
+_scratch_mkfs | _filter_mkfs 2> $tmp.mkfs > /dev/null
+cat $tmp.mkfs >> $seqres.full
+. $tmp.mkfs
+_scratch_mount >> $seqres.full
+
+cpus=$(( $(src/feature -o) * 4))
+
+# Use fsstress to create a directory tree with some variability
+FSSTRESS_ARGS=$(_scale_fsstress_args -p 4 -d $SCRATCH_MNT -n 4000 $FSSTRESS_AVOID)
+$FSSTRESS_PROG $FSSTRESS_ARGS >> $seqres.full
+
+$XFS_IO_PROG -c 'stat -v' $SCRATCH_MNT >> $seqres.full
+
+if $XFS_IO_PROG -c 'stat -v' $SCRATCH_MNT | grep -q 'rt-inherit'; then
+ # realtime
+ increment=$((dbsize * rtblocks / agcount))
+ length=$((dbsize * rtblocks))
+ fsmap_devarg="-r"
+else
+ # data
+ increment=$((dbsize * agsize))
+ length=$((dbsize * dblocks))
+ fsmap_devarg="-d"
+fi
+
+echo "start: $start; increment: $increment; length: $length" >> $seqres.full
+$DF_PROG $SCRATCH_MNT >> $seqres.full
+
+TRACE_PROG="strace -s99 -e fallocate,ioctl,openat -o $tmp.strace"
+
+for ((start = 0; start < length; start += increment)); do
+ echo "---------------------------" >> $seqres.full
+ echo "start: $start end: $((start + increment))" >> $seqres.full
+ echo "---------------------------" >> $seqres.full
+
+ fsmap_args="-vvvv $fsmap_devarg $((start / 512)) $((increment / 512))"
+ clearfree_args="-vall $start $increment"
+
+ $XFS_IO_PROG -c "fsmap $fsmap_args" $SCRATCH_MNT > $tmp.before
+ $TRACE_PROG $XFS_SPACEMAN_PROG -c "clearfree $clearfree_args" $SCRATCH_MNT &>> $seqres.full || break
+ cat $tmp.strace >> $seqres.full
+ $XFS_IO_PROG -c "fsmap $fsmap_args" $SCRATCH_MNT > $tmp.after
+ cat $tmp.before >> $seqres.full
+ cat $tmp.after >> $seqres.full
+done
+
+# success, all done
+echo Silence is golden
+status=0
+exit
diff --git a/tests/xfs/1401.out b/tests/xfs/1401.out
new file mode 100644
index 0000000000..504999381e
--- /dev/null
+++ b/tests/xfs/1401.out
@@ -0,0 +1,2 @@
+QA output created by 1401
+Silence is golden
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-12-31 3:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-30 21:14 [NYE DELUGE 4/4] xfs: freespace defrag for online shrink Darrick J. Wong
2022-12-30 22:21 ` [PATCHSET 0/1] xfs_scrub: vectorize kernel calls Darrick J. Wong
2022-12-30 22:21 ` [PATCH 1/1] xfs/122: update for vectored scrub Darrick J. Wong
2022-12-30 22:21 ` [PATCHSET 0/1] fstests: functional test for refcount reporting Darrick J. Wong
2022-12-30 22:21 ` [PATCH 1/1] xfs: test output of new FSREFCOUNTS ioctl Darrick J. Wong
2022-12-30 22:21 ` [PATCHSET 0/1] fstests: defragment free space Darrick J. Wong
2022-12-30 22:21 ` [PATCH 1/1] xfs: test clearing of " Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox