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>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
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
}
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 "} ;
+ '
+}