From: Nikolay Borisov <nborisov@suse.com>
To: linux-xfs@vger.kernel.org
Cc: fstests@vger.kernel.org, eguan@redhat.com, david@fromorbit.com,
darrick.wong@oracle.com, Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH v4 2/3] common: Implement fiemap's range query check
Date: Wed, 15 Nov 2017 14:11:39 +0200 [thread overview]
Message-ID: <1510747900-13440-2-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1510747900-13440-1-git-send-email-nborisov@suse.com>
Allow for users of xfstest to assert the presence of fiemap's
range query capabilities by requesting the "ranged" parameter.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
common/rc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/common/rc b/common/rc
index e2a8229..c98c224 100644
--- a/common/rc
+++ b/common/rc
@@ -2053,6 +2053,12 @@ _require_xfs_io_command()
-c "$command 4k 8k" $testfile 2>&1`
;;
"fiemap")
+ if echo "$param" | grep -q "ranged"; then
+ param=$(echo "$param" | sed "s/ranged//")
+ $XFS_IO_PROG -F -f -c "pwrite 0 5k" -c "fsync" $testfile > /dev/null 2>&1
+ lines=$($XFS_IO_PROG -c "fiemap 6k" $testfile 2>&1 | wc -l)
+ [ $lines -eq 1 ] || _notrun "xfs_io $command ranged support is missing"
+ fi
testio=`$XFS_IO_PROG -F -f -c "pwrite 0 20k" -c "fsync" \
-c "fiemap -v $param" $testfile 2>&1`
param_checked=1
--
2.7.4
next prev parent reply other threads:[~2017-11-15 12:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 12:10 [PATCH v4 1/2] fiemap: Factor out actual fiemap call code Nikolay Borisov
2017-11-15 12:10 ` [PATCH v4 2/2] fiemap: Implement ranged query Nikolay Borisov
2017-11-17 2:47 ` Eric Sandeen
2017-11-17 9:39 ` Nikolay Borisov
2017-11-15 12:11 ` [PATCH v4 1/3] generic: Adjust generic test outputs for new fiemap imeplementation Nikolay Borisov
2017-11-15 12:11 ` Nikolay Borisov [this message]
2017-11-21 5:39 ` [PATCH v4 2/3] common: Implement fiemap's range query check Eryu Guan
2017-11-15 12:11 ` [PATCH v4 3/3] xfs: initial fiemap range query test Nikolay Borisov
2017-11-21 5:45 ` Eryu Guan
2017-11-21 15:10 ` Nikolay Borisov
2017-11-21 5:29 ` [PATCH v4 1/3] generic: Adjust generic test outputs for new fiemap imeplementation Eryu Guan
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=1510747900-13440-2-git-send-email-nborisov@suse.com \
--to=nborisov@suse.com \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@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