2011-12-09 05:52:45

by Masayoshi MIZUMA

[permalink] [raw]
Subject: [PATCH] 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...

Signed-off-by: Masayoshi MIZUMA <[email protected]>
---
277 | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
277.out | 5 ++++
group | 1 +
3 files changed, 87 insertions(+), 0 deletions(-)
create mode 100755 277
create mode 100644 277.out

diff --git a/277 b/277
new file mode 100755
index 0000000..1cfa1b4
--- /dev/null
+++ b/277
@@ -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
diff --git a/277.out b/277.out
new file mode 100644
index 0000000..2cd57ec
--- /dev/null
+++ b/277.out
@@ -0,0 +1,5 @@
+QA output created by 277
+
+Run fsstress
+
+Run xfs_freeze in parallel
diff --git a/group b/group
index dd9f00d..24b8bd1 100644
--- a/group
+++ b/group
@@ -390,3 +390,4 @@ deprecated
274 auto rw
275 auto rw
276 auto rw metadata
+277 other auto
--
1.7.1

Thanks,
Masayoshi Mizuma





2011-12-09 07:17:00

by Dave Chinner

[permalink] [raw]
Subject: Re: [PATCH] xfstests: 277 new test to check freeze/unfreeze works well or not under heavy load.

On Fri, Dec 09, 2011 at 02:52:31PM +0900, Masayoshi MIZUMA wrote:
> 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

--
Dave Chinner
[email protected]

2011-12-12 09:31:55

by Masayoshi MIZUMA

[permalink] [raw]
Subject: Re: [PATCH] xfstests: 277 new test to check freeze/unfreeze works well or not under heavy load.


(2011/12/09 16:17), Dave Chinner wrote:

> On Fri, Dec 09, 2011 at 02:52:31PM +0900, Masayoshi MIZUMA wrote:
> > 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.

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

Masayoshi Mizuma

>
> Cheers,
>
> Dave
>
> --
> Dave Chinner
> [email protected]