* [PATCH v2 0/2] add test for zone_gc_low_space attribute writes @ 2026-03-27 12:34 Hans Holmberg 2026-03-27 12:34 ` [PATCH v2 1/2] xfs/647: turn rt dev block device lookup into a common helper Hans Holmberg 2026-03-27 12:34 ` [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses Hans Holmberg 0 siblings, 2 replies; 10+ messages in thread From: Hans Holmberg @ 2026-03-27 12:34 UTC (permalink / raw) To: zlang Cc: fstests, Christoph Hellwig, Damien Le Moal, Darrick J . Wong, linux-xfs, Hans Holmberg Adds a test for zone_gc_low_space attribute writes and some helpers to go along with that. The new test will fail currently, but i've submitted a fix: https://lore.kernel.org/linux-xfs/20260325124312.26349-1-hans.holmberg@wdc.com/ v2: - factored out useful helpers to common/xfs - style fixes suggested by Christoph - added a check that the scratch rt device is zoned before reading zone capacity v1: https://lore.kernel.org/fstests/20260325125013.26631-1-hans.holmberg@wdc.com/ Hans Holmberg (2): xfs/647: turn rt dev block device lookup into a common helper xfs: test that zone_gc_low_space writes start gc for rw fses common/xfs | 28 ++++++++++++++++++ tests/xfs/647 | 10 +------ tests/xfs/999 | 72 +++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/999.out | 2 ++ 4 files changed, 103 insertions(+), 9 deletions(-) create mode 100755 tests/xfs/999 create mode 100644 tests/xfs/999.out -- 2.34.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/2] xfs/647: turn rt dev block device lookup into a common helper 2026-03-27 12:34 [PATCH v2 0/2] add test for zone_gc_low_space attribute writes Hans Holmberg @ 2026-03-27 12:34 ` Hans Holmberg 2026-03-27 15:19 ` Darrick J. Wong 2026-03-30 5:33 ` Christoph Hellwig 2026-03-27 12:34 ` [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses Hans Holmberg 1 sibling, 2 replies; 10+ messages in thread From: Hans Holmberg @ 2026-03-27 12:34 UTC (permalink / raw) To: zlang Cc: fstests, Christoph Hellwig, Damien Le Moal, Darrick J . Wong, linux-xfs, Hans Holmberg Turn the logic figuring out on which block device the rt data is stored on into a common helper. Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com> --- common/xfs | 11 +++++++++++ tests/xfs/647 | 10 +--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/common/xfs b/common/xfs index 7fa0db2e26b4..c81f939e68d2 100644 --- a/common/xfs +++ b/common/xfs @@ -737,6 +737,17 @@ _xfs_metadump_supports_rt() $XFS_METADUMP_PROG --help 2>&1 | grep -q -- '-r rtdev' } +# What block device is rt data located on for scratch? +_xfs_get_scratch_rtdev_bdev() +{ + # Is the rt dev internal or not? + if [ -z "$SCRATCH_RTDEV" ]; then + echo "$SCRATCH_DEV" + else + echo "$SCRATCH_RTDEV" + fi +} + # Snapshot the metadata on the scratch device _scratch_xfs_metadump() { diff --git a/tests/xfs/647 b/tests/xfs/647 index 76959b28c779..0ef340a14b07 100755 --- a/tests/xfs/647 +++ b/tests/xfs/647 @@ -17,15 +17,7 @@ _begin_fstest auto quick zone _require_scratch _require_realtime -# -# Figure out if the rt section is internal or not -# -if [ -z "$SCRATCH_RTDEV" ]; then - zdev=$SCRATCH_DEV -else - zdev=$SCRATCH_RTDEV -fi - +zdev="$(_xfs_get_scratch_rtdev_bdev)" _require_zoned_device $zdev _require_command "$BLKZONE_PROG" blkzone -- 2.34.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] xfs/647: turn rt dev block device lookup into a common helper 2026-03-27 12:34 ` [PATCH v2 1/2] xfs/647: turn rt dev block device lookup into a common helper Hans Holmberg @ 2026-03-27 15:19 ` Darrick J. Wong 2026-03-30 5:33 ` Christoph Hellwig 1 sibling, 0 replies; 10+ messages in thread From: Darrick J. Wong @ 2026-03-27 15:19 UTC (permalink / raw) To: Hans Holmberg Cc: zlang, fstests, Christoph Hellwig, Damien Le Moal, linux-xfs On Fri, Mar 27, 2026 at 01:34:28PM +0100, Hans Holmberg wrote: > Turn the logic figuring out on which block device the rt data is stored on > into a common helper. > > Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> --D > --- > common/xfs | 11 +++++++++++ > tests/xfs/647 | 10 +--------- > 2 files changed, 12 insertions(+), 9 deletions(-) > > diff --git a/common/xfs b/common/xfs > index 7fa0db2e26b4..c81f939e68d2 100644 > --- a/common/xfs > +++ b/common/xfs > @@ -737,6 +737,17 @@ _xfs_metadump_supports_rt() > $XFS_METADUMP_PROG --help 2>&1 | grep -q -- '-r rtdev' > } > > +# What block device is rt data located on for scratch? > +_xfs_get_scratch_rtdev_bdev() > +{ > + # Is the rt dev internal or not? > + if [ -z "$SCRATCH_RTDEV" ]; then > + echo "$SCRATCH_DEV" > + else > + echo "$SCRATCH_RTDEV" > + fi > +} > + > # Snapshot the metadata on the scratch device > _scratch_xfs_metadump() > { > diff --git a/tests/xfs/647 b/tests/xfs/647 > index 76959b28c779..0ef340a14b07 100755 > --- a/tests/xfs/647 > +++ b/tests/xfs/647 > @@ -17,15 +17,7 @@ _begin_fstest auto quick zone > _require_scratch > _require_realtime > > -# > -# Figure out if the rt section is internal or not > -# > -if [ -z "$SCRATCH_RTDEV" ]; then > - zdev=$SCRATCH_DEV > -else > - zdev=$SCRATCH_RTDEV > -fi > - > +zdev="$(_xfs_get_scratch_rtdev_bdev)" > _require_zoned_device $zdev > _require_command "$BLKZONE_PROG" blkzone > > -- > 2.34.1 > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/2] xfs/647: turn rt dev block device lookup into a common helper 2026-03-27 12:34 ` [PATCH v2 1/2] xfs/647: turn rt dev block device lookup into a common helper Hans Holmberg 2026-03-27 15:19 ` Darrick J. Wong @ 2026-03-30 5:33 ` Christoph Hellwig 1 sibling, 0 replies; 10+ messages in thread From: Christoph Hellwig @ 2026-03-30 5:33 UTC (permalink / raw) To: Hans Holmberg Cc: zlang, fstests, Christoph Hellwig, Damien Le Moal, Darrick J . Wong, linux-xfs On Fri, Mar 27, 2026 at 01:34:28PM +0100, Hans Holmberg wrote: > Turn the logic figuring out on which block device the rt data is stored on > into a common helper. Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses 2026-03-27 12:34 [PATCH v2 0/2] add test for zone_gc_low_space attribute writes Hans Holmberg 2026-03-27 12:34 ` [PATCH v2 1/2] xfs/647: turn rt dev block device lookup into a common helper Hans Holmberg @ 2026-03-27 12:34 ` Hans Holmberg 2026-03-27 15:22 ` Darrick J. Wong 2026-03-30 5:34 ` Christoph Hellwig 1 sibling, 2 replies; 10+ messages in thread From: Hans Holmberg @ 2026-03-27 12:34 UTC (permalink / raw) To: zlang Cc: fstests, Christoph Hellwig, Damien Le Moal, Darrick J . Wong, linux-xfs, Hans Holmberg Test that writes to the sysfs attribute zone_gc_low_space triggers garbage collection for rw (but not ro) file systems. Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com> --- common/xfs | 17 +++++++++++ tests/xfs/999 | 72 +++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/999.out | 2 ++ 3 files changed, 91 insertions(+) create mode 100755 tests/xfs/999 create mode 100644 tests/xfs/999.out diff --git a/common/xfs b/common/xfs index c81f939e68d2..45d7f75d2064 100644 --- a/common/xfs +++ b/common/xfs @@ -748,6 +748,23 @@ _xfs_get_scratch_rtdev_bdev() fi } +# Get a stat from /proc/self/mountstats for a specific mount point +_xfs_get_mountstat() { + awk -v mount="$1" -v stat="$2" \ + '$0~"mounted on "mount" with fstype xfs"{f=1} f&&index($0,stat){print $NF;exit}' \ + /proc/self/mountstats +} + +# Get the user available blocks for a rt mount +_xfs_get_user_available_rt_blocks() { + _xfs_get_mountstat "$1" "user available RT blocks:" +} + +# Check if gc is required for a rt mount +_xfs_get_rt_gc_required () { + _xfs_get_mountstat "$1" "RT GC required:" +} + # Snapshot the metadata on the scratch device _scratch_xfs_metadump() { diff --git a/tests/xfs/999 b/tests/xfs/999 new file mode 100755 index 000000000000..2c5b54368b6d --- /dev/null +++ b/tests/xfs/999 @@ -0,0 +1,72 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2026 Western Digital Corporation +# +# FS QA Test No. 999 +# +# Tests that writes to zonegc_low_space will trigger start of garbage +# collection for rw (but not ro) file systems +# +. ./common/preamble +_begin_fstest auto rw zone quick + +. ./common/zoned + +_require_scratch +_require_odirect + +zdev="$(_xfs_get_scratch_rtdev_bdev)" +_require_zoned_device "$zdev" +capacity=$(_zone_capacity 0 $zdev) +_scratch_mkfs_sized $(($capacity * 6)) > $seqres.full 2>&1 + +# limit max open zones to avoid gc to trigger before we want it to +export MOUNT_OPTIONS="$MOUNT_OPTIONS -o max_open_zones=2" +_try_scratch_mount || _notrun "mount option not supported" +_require_xfs_scratch_zoned + +# create three zone-sized files and invalidate 95% of the data +for i in $(seq 1 3); do + filename=$SCRATCH_MNT/data_$i + dd if=/dev/zero of=$filename bs=1M oflag=direct\ + count=$(($capacity / (1024 * 1024))) >> $seqres.full 2>&1 + truncate -s $(($capacity / 20)) $filename +done + +# remount read-only and set the gc limit to free up unused space +_scratch_remount ro +rt_available_pre="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" +_set_fs_sysfs_attr $SCRATCH_DEV "zoned/zonegc_low_space" 100 + +# reclaiming a zone with 5% used blocks should take way less than 1 second +sleep 1 + +# gc should not run for read only file systems +rt_available_post="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" +[ "$rt_available_post" -gt "$rt_available_pre" ] && \ + _fail "gc should not run while read only" + +_set_fs_sysfs_attr $SCRATCH_DEV "zoned/zonegc_low_space" 0 + +# remount rw and check that gc starts, frees up blocks and stops after +# the threshold is set to reclaim the unused blocks +_scratch_remount rw + +rt_available_pre="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" +_set_fs_sysfs_attr $SCRATCH_DEV "zoned/zonegc_low_space" 100 + +i=0 +while [ $(_xfs_get_rt_gc_required "$SCRATCH_MNT") -eq "1" ]; do + sleep 1 + let i=$i+1 + [ $i -gt 3 ] && _fail "gc did not complete within a reasonable time" +done + +rt_available_post="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" +[ "$rt_available_pre" -ge "$rt_available_post" ] && \ + _fail "gc did not free up space" + +echo "Silence is golden" +status=0 + +exit diff --git a/tests/xfs/999.out b/tests/xfs/999.out new file mode 100644 index 000000000000..3b276ca804fc --- /dev/null +++ b/tests/xfs/999.out @@ -0,0 +1,2 @@ +QA output created by 999 +Silence is golden -- 2.34.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses 2026-03-27 12:34 ` [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses Hans Holmberg @ 2026-03-27 15:22 ` Darrick J. Wong 2026-03-31 20:42 ` Zorro Lang 2026-03-30 5:34 ` Christoph Hellwig 1 sibling, 1 reply; 10+ messages in thread From: Darrick J. Wong @ 2026-03-27 15:22 UTC (permalink / raw) To: Hans Holmberg Cc: zlang, fstests, Christoph Hellwig, Damien Le Moal, linux-xfs On Fri, Mar 27, 2026 at 01:34:29PM +0100, Hans Holmberg wrote: > Test that writes to the sysfs attribute zone_gc_low_space triggers > garbage collection for rw (but not ro) file systems. > > Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com> Looks good to me, given what I saw of the kernel patch. It probably needs a _fixed_by_kernel_commit tag once the patch goes upstream. Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> --D > --- > common/xfs | 17 +++++++++++ > tests/xfs/999 | 72 +++++++++++++++++++++++++++++++++++++++++++++++ > tests/xfs/999.out | 2 ++ > 3 files changed, 91 insertions(+) > create mode 100755 tests/xfs/999 > create mode 100644 tests/xfs/999.out > > diff --git a/common/xfs b/common/xfs > index c81f939e68d2..45d7f75d2064 100644 > --- a/common/xfs > +++ b/common/xfs > @@ -748,6 +748,23 @@ _xfs_get_scratch_rtdev_bdev() > fi > } > > +# Get a stat from /proc/self/mountstats for a specific mount point > +_xfs_get_mountstat() { > + awk -v mount="$1" -v stat="$2" \ > + '$0~"mounted on "mount" with fstype xfs"{f=1} f&&index($0,stat){print $NF;exit}' \ > + /proc/self/mountstats > +} > + > +# Get the user available blocks for a rt mount > +_xfs_get_user_available_rt_blocks() { > + _xfs_get_mountstat "$1" "user available RT blocks:" > +} > + > +# Check if gc is required for a rt mount > +_xfs_get_rt_gc_required () { > + _xfs_get_mountstat "$1" "RT GC required:" > +} > + > # Snapshot the metadata on the scratch device > _scratch_xfs_metadump() > { > diff --git a/tests/xfs/999 b/tests/xfs/999 > new file mode 100755 > index 000000000000..2c5b54368b6d > --- /dev/null > +++ b/tests/xfs/999 > @@ -0,0 +1,72 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (c) 2026 Western Digital Corporation > +# > +# FS QA Test No. 999 > +# > +# Tests that writes to zonegc_low_space will trigger start of garbage > +# collection for rw (but not ro) file systems > +# > +. ./common/preamble > +_begin_fstest auto rw zone quick > + > +. ./common/zoned > + > +_require_scratch > +_require_odirect > + > +zdev="$(_xfs_get_scratch_rtdev_bdev)" > +_require_zoned_device "$zdev" > +capacity=$(_zone_capacity 0 $zdev) > +_scratch_mkfs_sized $(($capacity * 6)) > $seqres.full 2>&1 > + > +# limit max open zones to avoid gc to trigger before we want it to > +export MOUNT_OPTIONS="$MOUNT_OPTIONS -o max_open_zones=2" > +_try_scratch_mount || _notrun "mount option not supported" > +_require_xfs_scratch_zoned > + > +# create three zone-sized files and invalidate 95% of the data > +for i in $(seq 1 3); do > + filename=$SCRATCH_MNT/data_$i > + dd if=/dev/zero of=$filename bs=1M oflag=direct\ > + count=$(($capacity / (1024 * 1024))) >> $seqres.full 2>&1 > + truncate -s $(($capacity / 20)) $filename > +done > + > +# remount read-only and set the gc limit to free up unused space > +_scratch_remount ro > +rt_available_pre="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" > +_set_fs_sysfs_attr $SCRATCH_DEV "zoned/zonegc_low_space" 100 > + > +# reclaiming a zone with 5% used blocks should take way less than 1 second > +sleep 1 > + > +# gc should not run for read only file systems > +rt_available_post="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" > +[ "$rt_available_post" -gt "$rt_available_pre" ] && \ > + _fail "gc should not run while read only" > + > +_set_fs_sysfs_attr $SCRATCH_DEV "zoned/zonegc_low_space" 0 > + > +# remount rw and check that gc starts, frees up blocks and stops after > +# the threshold is set to reclaim the unused blocks > +_scratch_remount rw > + > +rt_available_pre="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" > +_set_fs_sysfs_attr $SCRATCH_DEV "zoned/zonegc_low_space" 100 > + > +i=0 > +while [ $(_xfs_get_rt_gc_required "$SCRATCH_MNT") -eq "1" ]; do > + sleep 1 > + let i=$i+1 > + [ $i -gt 3 ] && _fail "gc did not complete within a reasonable time" > +done > + > +rt_available_post="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" > +[ "$rt_available_pre" -ge "$rt_available_post" ] && \ > + _fail "gc did not free up space" > + > +echo "Silence is golden" > +status=0 > + > +exit > diff --git a/tests/xfs/999.out b/tests/xfs/999.out > new file mode 100644 > index 000000000000..3b276ca804fc > --- /dev/null > +++ b/tests/xfs/999.out > @@ -0,0 +1,2 @@ > +QA output created by 999 > +Silence is golden > -- > 2.34.1 > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses 2026-03-27 15:22 ` Darrick J. Wong @ 2026-03-31 20:42 ` Zorro Lang 0 siblings, 0 replies; 10+ messages in thread From: Zorro Lang @ 2026-03-31 20:42 UTC (permalink / raw) To: fstests Cc: Hans Holmberg, zlang, Christoph Hellwig, Damien Le Moal, linux-xfs, Darrick J. Wong On Fri, Mar 27, 2026 at 08:22:18AM -0700, Darrick J. Wong wrote: > On Fri, Mar 27, 2026 at 01:34:29PM +0100, Hans Holmberg wrote: > > Test that writes to the sysfs attribute zone_gc_low_space triggers > > garbage collection for rw (but not ro) file systems. > > > > Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com> > > Looks good to me, given what I saw of the kernel patch. It probably > needs a _fixed_by_kernel_commit tag once the patch goes upstream. Yes, please :) It's helpful for downstream kernel maintainers. Thanks, Zorro > > Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> > > --D > > > --- > > common/xfs | 17 +++++++++++ > > tests/xfs/999 | 72 +++++++++++++++++++++++++++++++++++++++++++++++ > > tests/xfs/999.out | 2 ++ > > 3 files changed, 91 insertions(+) > > create mode 100755 tests/xfs/999 > > create mode 100644 tests/xfs/999.out > > > > diff --git a/common/xfs b/common/xfs > > index c81f939e68d2..45d7f75d2064 100644 > > --- a/common/xfs > > +++ b/common/xfs > > @@ -748,6 +748,23 @@ _xfs_get_scratch_rtdev_bdev() > > fi > > } > > > > +# Get a stat from /proc/self/mountstats for a specific mount point > > +_xfs_get_mountstat() { > > + awk -v mount="$1" -v stat="$2" \ > > + '$0~"mounted on "mount" with fstype xfs"{f=1} f&&index($0,stat){print $NF;exit}' \ > > + /proc/self/mountstats > > +} > > + > > +# Get the user available blocks for a rt mount > > +_xfs_get_user_available_rt_blocks() { > > + _xfs_get_mountstat "$1" "user available RT blocks:" > > +} > > + > > +# Check if gc is required for a rt mount > > +_xfs_get_rt_gc_required () { > > + _xfs_get_mountstat "$1" "RT GC required:" > > +} > > + > > # Snapshot the metadata on the scratch device > > _scratch_xfs_metadump() > > { > > diff --git a/tests/xfs/999 b/tests/xfs/999 > > new file mode 100755 > > index 000000000000..2c5b54368b6d > > --- /dev/null > > +++ b/tests/xfs/999 > > @@ -0,0 +1,72 @@ > > +#! /bin/bash > > +# SPDX-License-Identifier: GPL-2.0 > > +# Copyright (c) 2026 Western Digital Corporation > > +# > > +# FS QA Test No. 999 > > +# > > +# Tests that writes to zonegc_low_space will trigger start of garbage > > +# collection for rw (but not ro) file systems > > +# > > +. ./common/preamble > > +_begin_fstest auto rw zone quick > > + > > +. ./common/zoned > > + > > +_require_scratch > > +_require_odirect > > + > > +zdev="$(_xfs_get_scratch_rtdev_bdev)" > > +_require_zoned_device "$zdev" > > +capacity=$(_zone_capacity 0 $zdev) > > +_scratch_mkfs_sized $(($capacity * 6)) > $seqres.full 2>&1 > > + > > +# limit max open zones to avoid gc to trigger before we want it to > > +export MOUNT_OPTIONS="$MOUNT_OPTIONS -o max_open_zones=2" > > +_try_scratch_mount || _notrun "mount option not supported" > > +_require_xfs_scratch_zoned > > + > > +# create three zone-sized files and invalidate 95% of the data > > +for i in $(seq 1 3); do > > + filename=$SCRATCH_MNT/data_$i > > + dd if=/dev/zero of=$filename bs=1M oflag=direct\ > > + count=$(($capacity / (1024 * 1024))) >> $seqres.full 2>&1 > > + truncate -s $(($capacity / 20)) $filename > > +done > > + > > +# remount read-only and set the gc limit to free up unused space > > +_scratch_remount ro > > +rt_available_pre="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" > > +_set_fs_sysfs_attr $SCRATCH_DEV "zoned/zonegc_low_space" 100 > > + > > +# reclaiming a zone with 5% used blocks should take way less than 1 second > > +sleep 1 > > + > > +# gc should not run for read only file systems > > +rt_available_post="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" > > +[ "$rt_available_post" -gt "$rt_available_pre" ] && \ > > + _fail "gc should not run while read only" > > + > > +_set_fs_sysfs_attr $SCRATCH_DEV "zoned/zonegc_low_space" 0 > > + > > +# remount rw and check that gc starts, frees up blocks and stops after > > +# the threshold is set to reclaim the unused blocks > > +_scratch_remount rw > > + > > +rt_available_pre="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" > > +_set_fs_sysfs_attr $SCRATCH_DEV "zoned/zonegc_low_space" 100 > > + > > +i=0 > > +while [ $(_xfs_get_rt_gc_required "$SCRATCH_MNT") -eq "1" ]; do > > + sleep 1 > > + let i=$i+1 > > + [ $i -gt 3 ] && _fail "gc did not complete within a reasonable time" > > +done > > + > > +rt_available_post="$(_xfs_get_user_available_rt_blocks "$SCRATCH_MNT")" > > +[ "$rt_available_pre" -ge "$rt_available_post" ] && \ > > + _fail "gc did not free up space" > > + > > +echo "Silence is golden" > > +status=0 > > + > > +exit > > diff --git a/tests/xfs/999.out b/tests/xfs/999.out > > new file mode 100644 > > index 000000000000..3b276ca804fc > > --- /dev/null > > +++ b/tests/xfs/999.out > > @@ -0,0 +1,2 @@ > > +QA output created by 999 > > +Silence is golden > > -- > > 2.34.1 > > > > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses 2026-03-27 12:34 ` [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses Hans Holmberg 2026-03-27 15:22 ` Darrick J. Wong @ 2026-03-30 5:34 ` Christoph Hellwig 2026-03-31 20:39 ` Zorro Lang 1 sibling, 1 reply; 10+ messages in thread From: Christoph Hellwig @ 2026-03-30 5:34 UTC (permalink / raw) To: Hans Holmberg Cc: zlang, fstests, Christoph Hellwig, Damien Le Moal, Darrick J . Wong, linux-xfs On Fri, Mar 27, 2026 at 01:34:29PM +0100, Hans Holmberg wrote: > Test that writes to the sysfs attribute zone_gc_low_space triggers > garbage collection for rw (but not ro) file systems. .. and add common helpers for that. I tend to split the helpers out into separate commit, but I'm not sure if Zorro cares all that much about it. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses 2026-03-30 5:34 ` Christoph Hellwig @ 2026-03-31 20:39 ` Zorro Lang 2026-04-01 13:25 ` Hans Holmberg 0 siblings, 1 reply; 10+ messages in thread From: Zorro Lang @ 2026-03-31 20:39 UTC (permalink / raw) To: Christoph Hellwig Cc: Hans Holmberg, zlang, fstests, Damien Le Moal, Darrick J . Wong, linux-xfs On Mon, Mar 30, 2026 at 07:34:21AM +0200, Christoph Hellwig wrote: > On Fri, Mar 27, 2026 at 01:34:29PM +0100, Hans Holmberg wrote: > > Test that writes to the sysfs attribute zone_gc_low_space triggers > > garbage collection for rw (but not ro) file systems. > > .. and add common helpers for that. I tend to split the helpers out > into separate commit, but I'm not sure if Zorro cares all that much > about it. If a new case brings in a new helper, it doesn't matter to me if we separate the helper into a standalone patch or just bundle it with the new case. But if introduce a series of helpers, it makes more sense to split them out. For this patch, I won't treat the "splitting" as a blocker. If the author isn't keen on sending another patchset, I'm fine with the current version :) Thanks, Zorro > > Otherwise looks good: > > Reviewed-by: Christoph Hellwig <hch@lst.de> > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses 2026-03-31 20:39 ` Zorro Lang @ 2026-04-01 13:25 ` Hans Holmberg 0 siblings, 0 replies; 10+ messages in thread From: Hans Holmberg @ 2026-04-01 13:25 UTC (permalink / raw) To: Zorro Lang, Christoph Hellwig Cc: zlang@kernel.org, fstests@vger.kernel.org, Damien Le Moal, Darrick J . Wong, linux-xfs@vger.kernel.org On 31/03/2026 22:39, Zorro Lang wrote: > On Mon, Mar 30, 2026 at 07:34:21AM +0200, Christoph Hellwig wrote: >> On Fri, Mar 27, 2026 at 01:34:29PM +0100, Hans Holmberg wrote: >>> Test that writes to the sysfs attribute zone_gc_low_space triggers >>> garbage collection for rw (but not ro) file systems. >> >> .. and add common helpers for that. I tend to split the helpers out >> into separate commit, but I'm not sure if Zorro cares all that much >> about it. > > If a new case brings in a new helper, it doesn't matter to me if we separate > the helper into a standalone patch or just bundle it with the new case. > But if introduce a series of helpers, it makes more sense to split them out. > > For this patch, I won't treat the "splitting" as a blocker. If the author > isn't keen on sending another patchset, I'm fine with the current version :) > Thanks for clarifying this, would prefer not to send out another version with the easter vacation coming up :) Cheers, Hans ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-04-01 13:26 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-03-27 12:34 [PATCH v2 0/2] add test for zone_gc_low_space attribute writes Hans Holmberg 2026-03-27 12:34 ` [PATCH v2 1/2] xfs/647: turn rt dev block device lookup into a common helper Hans Holmberg 2026-03-27 15:19 ` Darrick J. Wong 2026-03-30 5:33 ` Christoph Hellwig 2026-03-27 12:34 ` [PATCH v2 2/2] xfs: test that zone_gc_low_space writes start gc for rw fses Hans Holmberg 2026-03-27 15:22 ` Darrick J. Wong 2026-03-31 20:42 ` Zorro Lang 2026-03-30 5:34 ` Christoph Hellwig 2026-03-31 20:39 ` Zorro Lang 2026-04-01 13:25 ` Hans Holmberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox