]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
filter.brtfs: add filter for conversion
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Tue, 27 Feb 2024 12:25:29 +0000 (13:25 +0100)
committerZorro Lang <zlang@kernel.org>
Fri, 1 Mar 2024 11:22:36 +0000 (19:22 +0800)
Add a filter for the output of btrfs-balance with a convert argument.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
common/filter.btrfs

index 8ab76fcb193a745770ac7d20ad4a9372dfe215c8..ea76e729110815e6126877c988fd230dca0d5c2d 100644 (file)
@@ -141,5 +141,11 @@ _filter_stripe_tree()
                -e "s/bytes used [0-9]+/bytes used XXXXXX/"
 }
 
+# filter output of "btrfs balance start -[smd] convert
+_filter_balance_convert()
+{
+       _filter_scratch | \
+       sed -e "s/relocate [0-9]\+ out of [0-9]\+ chunks/relocate X out of X chunks/g"
+}
 # make sure this script returns success
 /bin/true