[PATCH 01/15] common: add a _filter_rgno helper

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

 



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 "} ;
+	'
+}
-- 
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