From: Jeffle Xu <jefflexu@linux.alibaba.com>
To: fstests@vger.kernel.org
Cc: linux-ext4@vger.kernel.org, joseph.qi@linux.alibaba.com,
Jeffle Xu <jefflexu@linux.alibaba.com>
Subject: [PATCH RFC 2/2] xfstests: common/rc: add cluster size support for ext4
Date: Fri, 24 Apr 2020 17:33:50 +0800 [thread overview]
Message-ID: <1587720830-11955-3-git-send-email-jefflexu@linux.alibaba.com> (raw)
In-Reply-To: <1587720830-11955-1-git-send-email-jefflexu@linux.alibaba.com>
Inserting and collapsing range on ext4 with 'bigalloc' feature will
fail due to the offset and size should be alligned with the cluster
size.
The previous patch has add support for cluster size in fsx. Detect and
pass the cluster size parameter to fsx if the underlying filesystem
is ext4 with bigalloc.
Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
---
common/rc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/common/rc b/common/rc
index 2000bd9..71dde5f 100644
--- a/common/rc
+++ b/common/rc
@@ -3908,6 +3908,15 @@ run_fsx()
{
echo fsx $@
local args=`echo $@ | sed -e "s/ BSIZE / $bsize /g" -e "s/ PSIZE / $psize /g"`
+
+ if [ "$FSTYP" == "ext4" ]; then
+ local cluster_size=$(tune2fs -l $TEST_DEV | grep 'Cluster size' | awk '{print $3}')
+ if [ -n $cluster_size ]; then
+ echo "cluster size: $cluster_size"
+ args="$args -u $cluster_size"
+ fi
+ fi
+
set -- $here/ltp/fsx $args $FSX_AVOID $TEST_DIR/junk
echo "$@" >>$seqres.full
rm -f $TEST_DIR/junk
--
1.8.3.1
next prev parent reply other threads:[~2020-04-24 9:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 9:33 [PATCH RFC 0/2] fsx: make fsx perceptive to cluster size Jeffle Xu
2020-04-24 9:33 ` [PATCH RFC 1/2] xfstests: fsx: add support for " Jeffle Xu
2020-04-27 17:29 ` Darrick J. Wong
2020-04-29 7:22 ` JeffleXu
2020-04-24 9:33 ` Jeffle Xu [this message]
2020-04-27 17:33 ` [PATCH RFC 2/2] xfstests: common/rc: add cluster size support for ext4 Darrick J. Wong
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=1587720830-11955-3-git-send-email-jefflexu@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=fstests@vger.kernel.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).