lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 24 Apr 2020 17:33:50 +0800
From:   Jeffle Xu <jefflexu@...ux.alibaba.com>
To:     fstests@...r.kernel.org
Cc:     linux-ext4@...r.kernel.org, joseph.qi@...ux.alibaba.com,
        Jeffle Xu <jefflexu@...ux.alibaba.com>
Subject: [PATCH RFC 2/2] xfstests: common/rc: add cluster size support for ext4

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@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ