From: Christoph Hellwig <hch@lst.de>
To: Zorro Lang <zlang@kernel.org>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
Hans Holmberg <hans.holmberg@wdc.com>,
fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: [PATCH 01/16] common: generalize _filter_agno
Date: Thu, 8 May 2025 07:34:30 +0200 [thread overview]
Message-ID: <20250508053454.13687-2-hch@lst.de> (raw)
In-Reply-To: <20250508053454.13687-1-hch@lst.de>
Rename and move to common/xfs so that it can be reused for rgnos in new
zoned tests.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
common/filestreams | 11 +----------
common/xfs | 10 ++++++++++
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/common/filestreams b/common/filestreams
index bb8459405b3e..ace8f3b74de6 100644
--- a/common/filestreams
+++ b/common/filestreams
@@ -42,19 +42,10 @@ _do_stream()
done
}
-_filter_agno()
-{
- # the ag number is in column 4 of xfs_bmap output
- perl -ne '
- $ag = (split /\s+/)[4] ;
- if ($ag =~ /\d+/) {print "$ag "} ;
- '
-}
-
_get_stream_ags()
{
local directory_name=$1
- local stream_ags=`xfs_bmap -vp ${directory_name}/* | _filter_agno`
+ local stream_ags=`xfs_bmap -vp ${directory_name}/* | _filter_bmap_gno`
echo $stream_ags
}
diff --git a/common/xfs b/common/xfs
index 39650bac6c23..061ca586c84f 100644
--- a/common/xfs
+++ b/common/xfs
@@ -2274,3 +2274,13 @@ _scratch_find_rt_metadir_entry() {
return 1
}
+
+# extract the AG/RTG number from xfs_bmap output
+_filter_bmap_gno()
+{
+ # The AG/RG number is in column 4 of xfs_bmap output
+ perl -ne '
+ $ag = (split /\s+/)[4] ;
+ if ($ag =~ /\d+/) {print "$ag "} ;
+ '
+}
--
2.47.2
next prev parent reply other threads:[~2025-05-08 5:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 5:34 new tests for zoned xfs v3 Christoph Hellwig
2025-05-08 5:34 ` Christoph Hellwig [this message]
2025-05-08 15:12 ` [PATCH 01/16] common: generalize _filter_agno Darrick J. Wong
2025-05-08 5:34 ` [PATCH 02/16] add a new rw_hint helper Christoph Hellwig
2025-05-08 5:34 ` [PATCH 03/16] xfs: add a test for zoned block accounting after remount Christoph Hellwig
2025-05-08 5:34 ` [PATCH 04/16] xfs: add a zoned growfs test Christoph Hellwig
2025-05-08 5:34 ` [PATCH 05/16] xfs: add test to check for block layer reordering Christoph Hellwig
2025-05-08 5:34 ` [PATCH 06/16] xfs: add a test to check that data growfs fails with internal rt device Christoph Hellwig
2025-05-08 5:34 ` [PATCH 07/16] xfs: add a test for write lifetime hints Christoph Hellwig
2025-05-08 5:34 ` [PATCH 08/16] xfs: add a test for writeback after close Christoph Hellwig
2025-05-08 5:34 ` [PATCH 09/16] xfs: test zone stream separation for two direct writers Christoph Hellwig
2025-05-08 5:34 ` [PATCH 10/16] xfs: test zone stream separation for two buffered writers Christoph Hellwig
2025-05-08 5:34 ` [PATCH 11/16] xfs: test zoned ENOSPC behavior with multiple writers Christoph Hellwig
2025-05-08 5:34 ` [PATCH 12/16] xfs: test zoned GC file defragmentation for sequential writers Christoph Hellwig
2025-05-08 5:34 ` [PATCH 13/16] xfs: test zoned GC file defragmentation for random writers Christoph Hellwig
2025-05-08 5:34 ` [PATCH 14/16] xfs: test that xfs_repair does not mess up the zone used counter Christoph Hellwig
2025-05-08 5:34 ` [PATCH 15/16] xfs: test that truncate does not spuriously return ENOSPC Christoph Hellwig
2025-05-08 5:34 ` [PATCH 16/16] xfs: test that we can handle spurious zone wp advancements Christoph Hellwig
2025-05-08 18:43 ` new tests for zoned xfs v3 Zorro Lang
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=20250508053454.13687-2-hch@lst.de \
--to=hch@lst.de \
--cc=djwong@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;
as well as URLs for NNTP newsgroup(s).