diff mbox series

[v4,2/3] filter.btrfs: add filter for btrfs device add

Message ID 20240227-balance-fix-v4-2-d22d63972d93@kernel.org (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. 27, 2024, 12:25 p.m. UTC
From: Johannes Thumshirn <johannes.thumshirn@wdc.com>

Add a filter for the output of btrfs device add.

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

Patch

diff --git a/common/filter.btrfs b/common/filter.btrfs
index ea76e729..9ef96761 100644
--- a/common/filter.btrfs
+++ b/common/filter.btrfs
@@ -147,5 +147,14 @@  _filter_balance_convert()
 	_filter_scratch | \
 	sed -e "s/relocate [0-9]\+ out of [0-9]\+ chunks/relocate X out of X chunks/g"
 }
+
+# filter output of "btrfs device add"
+_filter_device_add()
+{
+	_filter_scratch | _filter_scratch_pool | \
+	sed -e "/Resetting device zones SCRATCH_DEV ([0-9]\+/d"
+
+}
+
 # make sure this script returns success
 /bin/true