On Wed, May 07, 2025 at 07:12:21AM +0200, Christoph Hellwig wrote: > Based on the existing _filter_agno helper. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > --- > common/xfs | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/common/xfs b/common/xfs > index 39650bac6c23..98f50e6dc04b 100644 > --- a/common/xfs > +++ b/common/xfs > @@ -2274,3 +2274,13 @@ _scratch_find_rt_metadir_entry() { > > return 1 > } > + > +# extract the realtime grou number from xfs_bmap output > +_filter_rgno() > +{ > + # the rg number is in column 4 of xfs_bmap output > + perl -ne ' > + $rg = (split /\s+/)[4] ; > + if ($rg =~ /\d+/) {print "$rg "} ; > + ' > +} Er... maybe this should be called _filter_bmap_gno (and go in common/filter) and then we can change the one caller of _filter_agno? --D > -- > 2.47.2 > >