[PATCH 01/16] common: generalize _filter_agno

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rename and move to common/xfs so that it can be reused for rgnos in new
zoned tests.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 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





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux