public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: fstests <fstests@vger.kernel.org>
Subject: [PATCH] common/punch: handle bmap output for unaligned extents
Date: Fri, 4 Dec 2015 16:48:00 -0600	[thread overview]
Message-ID: <56621820.5090902@redhat.com> (raw)

xfs/242 fails if the mapping flags show unaligned extents;
fix up the regexp to allow this, we really only care about
the unwritten flag.

Signed-off-by: eric Sandeen <sandeen@redhat.com>
---

diff --git a/common/punch b/common/punch
index be193d6..8e770f7 100644
--- a/common/punch
+++ b/common/punch
@@ -234,6 +234,11 @@ _filter_hole_fiemap()
 	_coalesce_extents
 }
 
+#     10000 Unwritten preallocated extent
+#     01000 Doesn't begin on stripe unit
+#     00100 Doesn't end   on stripe unit
+#     00010 Doesn't begin on stripe width
+#     00001 Doesn't end   on stripe width
 _filter_bmap()
 {
 	awk '
@@ -241,11 +246,11 @@ _filter_bmap()
 			print $1, $2, $3;
 			next;
 		}
-		$7 ~ /10000/ {
+		$7 ~ /1[01][01][01][01]/ {
 			print $1, $2, "unwritten";
 			next;
 		}
-		$7 ~ /00000/ {
+		$7 ~ /0[01][01][01][01]/ {
 			print $1, $2, "data"
 		}' |
 	_coalesce_extents


                 reply	other threads:[~2015-12-04 22:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=56621820.5090902@redhat.com \
    --to=sandeen@redhat.com \
    --cc=fstests@vger.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