All of lore.kernel.org
 help / color / mirror / Atom feed
From: Murphy Zhou <jencce.kernel@gmail.com>
To: fstests@vger.kernel.org
Subject: [PATCH] generic/new: drop caches while freeze
Date: Wed, 13 Dec 2023 17:20:43 +0800	[thread overview]
Message-ID: <20231213092043.1621684-1-jencce.kernel@gmail.com> (raw)

Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
---
 tests/generic/734     | 34 ++++++++++++++++++++++++++++++++++
 tests/generic/734.out |  2 ++
 2 files changed, 36 insertions(+)
 create mode 100755 tests/generic/734
 create mode 100644 tests/generic/734.out

diff --git a/tests/generic/734 b/tests/generic/734
new file mode 100755
index 00000000..8ca91930
--- /dev/null
+++ b/tests/generic/734
@@ -0,0 +1,34 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+#
+# FS QA Test 734
+#
+# Test possible deadlock of umount and reclaim memory
+# when there are EOF blocks in files.
+#
+. ./common/preamble
+_begin_fstest freeze auto quick
+
+_supported_fs generic
+_require_scratch
+
+$XFS_IO_PROG -fc "pwrite 0 64k" $SCRATCH_MNT/testfile >> $seqres.full
+cat $SCRATCH_MNT/testfile >> $SCRATCH_MNT/testfile1
+cat $SCRATCH_MNT/testfile >> $SCRATCH_MNT/testfile1
+
+sync
+
+fsfreeze -f $SCRATCH_MNT
+
+# This will hang if bug reproduces
+echo 3 > /proc/sys/vm/drop_caches &
+
+# Manually unfreeze after a while
+sleep 5
+fsfreeze -u $SCRATCH_MNT
+
+wait
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/generic/734.out b/tests/generic/734.out
new file mode 100644
index 00000000..4299839b
--- /dev/null
+++ b/tests/generic/734.out
@@ -0,0 +1,2 @@
+QA output created by 734
+Silence is golden
-- 
2.31.1


             reply	other threads:[~2023-12-13  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13  9:20 Murphy Zhou [this message]
2023-12-13 15:34 ` [PATCH] generic/new: drop caches while freeze Zorro Lang
2023-12-15  6:21   ` Murphy Zhou
2023-12-15 11:55     ` [PATCH v2] " Murphy Zhou
2023-12-15 17:31       ` Zorro Lang

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=20231213092043.1621684-1-jencce.kernel@gmail.com \
    --to=jencce.kernel@gmail.com \
    --cc=fstests@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.