public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nirjhar Roy (IBM)" <nirjhar.roy.lists@gmail.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, ritesh.list@gmail.com,
	ojaswin@linux.ibm.com, djwong@kernel.org, zlang@kernel.org,
	fdmanana@kernel.org, nirjhar.roy.lists@gmail.com
Subject: [PATCH 1/7] common/filter: Add a helper function to filter offsets and sizes
Date: Tue, 29 Jul 2025 06:21:44 +0000	[thread overview]
Message-ID: <45abeee1d9aa4fbb31fd2cb616c5c9f4c4add6d0.1753769382.git.nirjhar.roy.lists@gmail.com> (raw)
In-Reply-To: <cover.1753769382.git.nirjhar.roy.lists@gmail.com>

_filter_xfs_io_size_offset() filters out the size and the offset
emitted by various subcommands of xfs_io like pwrite.

Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
---
 common/filter | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/common/filter b/common/filter
index bbe13f4c..45188a5a 100644
--- a/common/filter
+++ b/common/filter
@@ -115,6 +115,20 @@ _filter_date()
 	-e 's/[A-Z][a-z][a-z] [A-z][a-z][a-z]  *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9]$/DATE/'
 }
 
+# This filters out the offsets and bytes written with
+# various subcommands of xfs_io. For example
+# wrote 4096/4096 bytes at offset 1052672 will be
+# converted to
+# wrote SIZE/SIZE bytes at offset OFFSET.
+# usage: __filter_xfs_io_size_offset <offset> <size>
+_filter_xfs_io_size_offset()
+{
+	local offset="$1"
+	local size="$2"
+	sed -e "s#${size}/${size}#SIZE/SIZE#g" \
+		-e "s#offset ${offset}#offset OFFSET#g"
+}
+
 # prints filtered output on stdout, values (use eval) on stderr
 # Non XFS filesystems always return a 4k block size and a 256 byte inode.
 _filter_mkfs()
-- 
2.34.1


  reply	other threads:[~2025-07-29  6:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29  6:21 [PATCH 0/7] btrfs: Misc test fixes for large block/node sizes Nirjhar Roy (IBM)
2025-07-29  6:21 ` Nirjhar Roy (IBM) [this message]
2025-07-29  6:21 ` [PATCH 2/7] common/btrfs: Add a helper function to get the nodesize Nirjhar Roy (IBM)
2025-07-29  6:21 ` [PATCH 3/7] btrfs/137: Make this compatible with all block sizes Nirjhar Roy (IBM)
2025-08-04  3:58   ` Qu Wenruo
2025-08-05  9:41     ` Ojaswin Mujoo
2025-08-05  9:44       ` Qu Wenruo
2025-08-05 12:39         ` Ojaswin Mujoo
2025-08-05 10:47       ` Filipe Manana
2025-08-12  6:23         ` Nirjhar Roy (IBM)
2025-08-12  6:22     ` Nirjhar Roy (IBM)
2025-07-29  6:21 ` [PATCH 4/7] btrfs/200: Make this test scale with the block size Nirjhar Roy (IBM)
2025-07-29  6:53   ` Filipe Manana
2025-08-12  6:26     ` Nirjhar Roy (IBM)
2025-08-04  4:19   ` Qu Wenruo
2025-07-29  6:21 ` [PATCH 5/7] generic/563: Increase the write tolerance to 6% for larger nodesize Nirjhar Roy (IBM)
2025-07-29  7:45   ` Christoph Hellwig
2025-08-04  7:18     ` Nirjhar Roy (IBM)
2025-07-30 15:06   ` Filipe Manana
2025-08-04  7:18     ` Nirjhar Roy (IBM)
2025-08-04  4:28   ` Qu Wenruo
2025-08-12  6:27     ` Nirjhar Roy (IBM)
2025-07-29  6:21 ` [PATCH 6/7] btrfs/301: Make this test compatible with all block sizes Nirjhar Roy (IBM)
2025-08-04  4:32   ` Qu Wenruo
2025-08-12  6:30     ` Nirjhar Roy (IBM)
2025-07-29  6:21 ` [PATCH 7/7] generic/274: Make the test compatible with all blocksizes Nirjhar Roy (IBM)
2025-08-04  4:35   ` Qu Wenruo
2025-08-12  6:30     ` Nirjhar Roy (IBM)

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=45abeee1d9aa4fbb31fd2cb616c5c9f4c4add6d0.1753769382.git.nirjhar.roy.lists@gmail.com \
    --to=nirjhar.roy.lists@gmail.com \
    --cc=djwong@kernel.org \
    --cc=fdmanana@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    --cc=zlang@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox