Skip to contentSkip to conversation

xfstests: 277 new test to check freeze/unfreeze works well or not under heavy load.

PATCH In review Masayoshi MIZUMA 2 participants 3 messages Dec 9, 2011 – Dec 12, 2011 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: 277 new test to check freeze/unfreeze works well or not under heavy load.

Hi,

unfreeze function, thaw_super(), sometimes hangs up if flush kernel thread does writeback to the same filesystem concurrently. (the problem is reported at
http://marc.info/?l=linux-ext4&m=132339590004560&w=2)

This test runs freeze/unfreeze under heavy load. If the problem is reproduced, this test will hang up...

---
 277     |   81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 277.out |    5 ++++
 group   |    1 +
 3 files changed, 87 insertions(+), 0 deletions(-)
 create mode 100755 277
 create mode 100644 277.out
277 new file +81 -0
new file mode 100755
index 0000000..1cfa1b4
@@ -0,0 +1,81 @@
+#! /bin/bash
+# FSQA Test No. 277
+#
+# Run fsstress and freeze/unfreeze in parallel, check freeze/unfreeze
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2011-2012 Fujitsu, Inc.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#-----------------------------------------------------------------------
+#
+# creator
[email protected]
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=0 # success is the default!
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_workout()
+{
+	echo ""
+	echo "Run fsstress"
+	echo ""
+	num_iterations=500
+	out=$SCRATCH_MNT/fsstress.$$
+	args="-p100 -n10000 -d $out"
+	echo "fsstress $args" >> $here/$seq.full
+	$FSSTRESS_PROG $args > /dev/null 2>&1 &
+	pid=$!
+	echo "Run xfs_freeze in parallel"
+	for ((i=0; i < num_iterations; i++))
+	do
+		xfs_freeze -f $SCRATCH_MNT | tee -a $seq.full
+		xfs_freeze -u $SCRATCH_MNT | tee -a $seq.full
+	done
+	kill $pid 2> /dev/null
+	wait $pid
+}
+
+# real QA test starts here
+_supported_fs generic
+_supported_os Linux
+_need_to_be_root
+_require_scratch
+
+_scratch_mkfs >> $seq.full 2>&1
+_scratch_mount
+
+if ! _workout; then
+	umount $SCRATCH_DEV 2>/dev/null
+	exit
+fi
+
+if ! _scratch_unmount; then
+	echo "failed to umount"
+	status=1
+	exit
+fi
+_check_scratch_fs
+status=$?
+exit
277.out new file +5 -0
new file mode 100644
index 0000000..2cd57ec
@@ -0,0 +1,5 @@
+QA output created by 277
+
+Run fsstress
+
+Run xfs_freeze in parallel
group +1 -0
index dd9f00d..24b8bd1 100644
@@ -390,3 +390,4 @@ deprecated
 274 auto rw
 275 auto rw
 276 auto rw metadata
+277 other auto
Signature · 4 lines
1.7.1

Thanks,
Masayoshi Mizuma
#1 lore raw
Quoted 9 lines · Masayoshi MIZUMA

Hi,

unfreeze function, thaw_super(), sometimes hangs up if flush kernel thread does writeback to the same filesystem concurrently. (the problem is reported at
http://marc.info/?l=linux-ext4&m=132339590004560&w=2)

This test runs freeze/unfreeze under heavy load. If the problem is reproduced, this test will hang up...

This is effectively a duplicate of test 068, which is currently described as an XFS only test. It is actually generic now that xfs_freeze works on other filesytsems, so please update 068 appropriately rather that introducing a new test.

Cheers,

Dave

Signature · 2 lines
Dave Chinner
[email protected]
#2 lore raw
Quoted 8 lines · Dave Chinner
Quoted 7 lines · Masayoshi MIZUMA

Hi,

unfreeze function, thaw_super(), sometimes hangs up if flush kernel thread does writeback to the same filesystem concurrently. (the problem is reported at
http://marc.info/?l=linux-ext4&m=132339590004560&w=2)

Quoted 7 lines
Quoted 2 lines

This test runs freeze/unfreeze under heavy load. If the problem is reproduced, this test will hang up...

This is effectively a duplicate of test 068, which is currently described as an XFS only test. It is actually generic now that xfs_freeze works on other filesytsems, so please update 068 appropriately rather that introducing a new test.

OK, I will try to update 068 to reproduce the problem, thanks!

Masayoshi Mizuma

Quoted 8 lines

Cheers,

Dave

Signature · 2 lines
Dave Chinner
[email protected]