All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
To: Anand Jain <anand.jain@oracle.com>, Zorro Lang <zlang@redhat.com>
Cc: Filipe Manana <fdmanana@suse.com>,
	fstests@vger.kernel.org,  linux-btrfs@vger.kernel.org,
	 Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH v5 2/9] common: add filter for btrfs raid-stripe dump
Date: Thu, 07 Dec 2023 01:03:29 -0800	[thread overview]
Message-ID: <20231207-btrfs-raid-v5-2-44aa1affe856@wdc.com> (raw)
In-Reply-To: <20231207-btrfs-raid-v5-0-44aa1affe856@wdc.com>

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

diff --git a/common/filter.btrfs b/common/filter.btrfs
index 02c6b92dfa94..2003ba7b7015 100644
--- a/common/filter.btrfs
+++ b/common/filter.btrfs
@@ -125,5 +125,19 @@ _filter_btrfs_cloner_error()
 	sed -e "s/\(clone failed:\) Operation not supported/\1 Invalid argument/g"
 }
 
+# filter output of "btrfs inspect-internal dump-tree -t raid-stripe"
+_filter_stripe_tree()
+{
+	sed -E -e "s/leaf [0-9]+ items [0-9]+ free space [0-9]+ generation [0-9]+ owner RAID_STRIPE_TREE/leaf XXXXXXXXX items X free space XXXXX generation X owner RAID_STRIPE_TREE/" \
+		-e "s/leaf [0-9]+ flags 0x1\(WRITTEN\) backref revision 1/leaf XXXXXXXXX flags 0x1\(WRITTEN\) backref revision 1/" \
+		-e "s/checksum stored [0-9a-f]+/checksum stored <CHECKSUM>/"  \
+		-e "s/checksum calced [0-9a-f]+/checksum calced <CHECKSUM>/"  \
+		-e "s/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/<UUID>/" \
+		-e "s/item ([0-9]+) key \([0-9]+ RAID_STRIPE ([0-9]+)\) itemoff [0-9]+ itemsize ([0-9]+)/item \1 key \(XXXXXX RAID_STRIPE \2\) itemoff XXXXX itemsize \3/" \
+		-e "s/stripe ([0-9]+) devid ([0-9]+) physical [0-9]+/stripe \1 devid \2 physical XXXXXXXXX/" \
+		-e "s/total bytes [0-9]+/total bytes XXXXXXXX/" \
+		-e "s/bytes used [0-9]+/bytes used XXXXXX/"
+}
+
 # make sure this script returns success
 /bin/true

-- 
2.43.0


  parent reply	other threads:[~2023-12-07  9:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07  9:03 [PATCH v5 0/9] fstests: add tests for btrfs' raid-stripe-tree feature Johannes Thumshirn
2023-12-07  9:03 ` [PATCH v5 1/9] fstests: doc: add new raid-stripe-tree group Johannes Thumshirn
2023-12-07  9:03 ` Johannes Thumshirn [this message]
2023-12-07  9:03 ` [PATCH v5 3/9] common: add _require_btrfs_no_nodatacow helper Johannes Thumshirn
2023-12-07  9:03 ` [PATCH v5 4/9] common: add _require_btrfs_free_space_tree Johannes Thumshirn
2023-12-07  9:03 ` [PATCH v5 5/9] btrfs: add fstest for stripe-tree metadata with 4k write Johannes Thumshirn
2023-12-07  9:03 ` [PATCH v5 6/9] btrfs: add fstest for 8k write spanning two stripes on raid-stripe-tree Johannes Thumshirn
2023-12-07  9:03 ` [PATCH v5 7/9] btrfs: add fstest for writing to a file at an offset with RST Johannes Thumshirn
2023-12-07  9:03 ` [PATCH v5 8/9] btrfs: add fstests to write 128k to a RST filesystem Johannes Thumshirn
2023-12-07  9:03 ` [PATCH v5 9/9] btrfs: add fstest for overwriting a file partially with RST Johannes Thumshirn
2023-12-07 12:11 ` [PATCH v5 0/9] fstests: add tests for btrfs' raid-stripe-tree feature Filipe Manana
2023-12-08  1:19   ` Anand Jain
2023-12-08  9:19     ` Johannes Thumshirn
2023-12-09 19:15       ` Neal Gompa
2023-12-11  8:49         ` Johannes Thumshirn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231207-btrfs-raid-v5-2-44aa1affe856@wdc.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=anand.jain@oracle.com \
    --cc=fdmanana@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=zlang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.