On Thu, May 08, 2025 at 07:34:30AM +0200, Christoph Hellwig wrote: > 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> Looks good, Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx> --D > --- > 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 > >