diff mbox series

[v3,1/3] filter.brtfs: add filter for conversion

Message ID 20240215-balance-fix-v3-1-79df5d5a940f@wdc.com (mailing list archive)
State New, archived
Headers show
Series fstests: btrfs: add test for zoned balance profile conversion bug | expand

Commit Message

Johannes Thumshirn Feb. 15, 2024, 11:47 a.m. UTC
Add a filter for the output of btrfs-balance with a convert argument.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 common/filter.btrfs | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/common/filter.btrfs b/common/filter.btrfs
index 8ab76fcb193a..ea76e7291108 100644
--- a/common/filter.btrfs
+++ b/common/filter.btrfs
@@ -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