public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Hans Holmberg <hans.holmberg@wdc.com>
Cc: zlang@kernel.org, fstests@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>,
	Damien Le Moal <dlemoal@kernel.org>,
	"Darrick J . Wong" <djwong@kernel.org>,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: test that zone_gc_low_space writes start gc for rw fses
Date: Thu, 26 Mar 2026 07:11:37 +0100	[thread overview]
Message-ID: <20260326061137.GC23733@lst.de> (raw)
In-Reply-To: <20260325125013.26631-1-hans.holmberg@wdc.com>

On Wed, Mar 25, 2026 at 01:50:13PM +0100, Hans Holmberg wrote:
> Test that writes to the systfs attribute zone_gc_low_space triggers

s/systfs/sysfs/

> +get_scratch_mountstat() {
> +	awk -v mount="$SCRATCH_MNT" -v stat="$1" \
> +		'$0~"mounted on "mount" with fstype xfs"{f=1} f&&index($0,stat){print $NF;exit}' \
> +		/proc/self/mountstats
> +}
> +
> +get_user_available_rt_blocks() {
> +	get_scratch_mountstat "user available RT blocks:"
> +}
> +
> +gc_required() {
> +	get_scratch_mountstat "RT GC required:"
> +}

Should these go to common/xfs ?

> +
> +# figure out if the rt section is internal or not
> +if [ -z "$SCRATCH_RTDEV" ]; then
> +	zdev=$SCRATCH_DEV
> +else
> +	zdev=$SCRATCH_RTDEV
> +fi

Same for this asa new helper?

> +[ "$rt_available_post" -gt "$rt_available_pre" ] && _fail "gc should not run while read only"

Split up either using \ or a real if statement to avoid the overly long
line.

> +[ "$rt_available_pre" -ge "$rt_available_post" ] && _fail "gc did not free up space"

Same here.

Otherwise this looks good.


  reply	other threads:[~2026-03-26  6:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 12:50 [PATCH] xfs: test that zone_gc_low_space writes start gc for rw fses Hans Holmberg
2026-03-26  6:11 ` Christoph Hellwig [this message]
2026-03-26 13:41   ` Hans Holmberg
2026-03-26 14:12     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260326061137.GC23733@lst.de \
    --to=hch@lst.de \
    --cc=djwong@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hans.holmberg@wdc.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox