public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Catherine Hoang <catherine.hoang@oracle.com>
To: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Cc: allison.henderson@oracle.com
Subject: [PATCH v2 3/4] common/log: Move *_dump_log routines to common/log
Date: Thu,  7 Oct 2021 00:26:40 +0000	[thread overview]
Message-ID: <20211007002641.714906-4-catherine.hoang@oracle.com> (raw)
In-Reply-To: <20211007002641.714906-1-catherine.hoang@oracle.com>

Move _scratch_remount_dump_log and _test_remount_dump_log from
common/inject to common/log. These routines do not inject errors and
should be placed with other common log functions.

Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
---
 common/inject | 26 --------------------------
 common/log    | 26 ++++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/common/inject b/common/inject
index b5334d4a..6b590804 100644
--- a/common/inject
+++ b/common/inject
@@ -111,29 +111,3 @@ _scratch_inject_error()
 		_fail "Cannot inject error ${type} value ${value}."
 	fi
 }
-
-# Unmount and remount the scratch device, dumping the log
-_scratch_remount_dump_log()
-{
-	local opts="$1"
-
-	if test -n "$opts"; then
-		opts="-o $opts"
-	fi
-	_scratch_unmount
-	_scratch_dump_log
-	_scratch_mount "$opts"
-}
-
-# Unmount and remount the test device, dumping the log
-_test_remount_dump_log()
-{
-	local opts="$1"
-
-	if test -n "$opts"; then
-		opts="-o $opts"
-	fi
-	_test_unmount
-	_test_dump_log
-	_test_mount "$opts"
-}
diff --git a/common/log b/common/log
index c7921f50..0a9aaa7f 100644
--- a/common/log
+++ b/common/log
@@ -608,5 +608,31 @@ _get_log_configs()
     esac
 }
 
+# Unmount and remount the scratch device, dumping the log
+_scratch_remount_dump_log()
+{
+	local opts="$1"
+
+	if test -n "$opts"; then
+		opts="-o $opts"
+	fi
+	_scratch_unmount
+	_scratch_dump_log
+	_scratch_mount "$opts"
+}
+
+# Unmount and remount the test device, dumping the log
+_test_remount_dump_log()
+{
+	local opts="$1"
+
+	if test -n "$opts"; then
+		opts="-o $opts"
+	fi
+	_test_unmount
+	_test_dump_log
+	_test_mount "$opts"
+}
+
 # make sure this script returns success
 /bin/true
-- 
2.25.1


  parent reply	other threads:[~2021-10-07  0:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07  0:26 [PATCH v2 0/4] Dump log cleanups Catherine Hoang
2021-10-07  0:26 ` [PATCH v2 1/4] xfstests: Rename _scratch_inject_logprint to _scratch_remount_dump_log Catherine Hoang
2021-10-07 16:20   ` Darrick J. Wong
2021-10-07  0:26 ` [PATCH v2 2/4] xfstests: Rename _test_inject_logprint to _test_remount_dump_log Catherine Hoang
2021-10-07 16:19   ` Darrick J. Wong
2021-10-07  0:26 ` Catherine Hoang [this message]
2021-10-07 16:19   ` [PATCH v2 3/4] common/log: Move *_dump_log routines to common/log Darrick J. Wong
2021-10-07  0:26 ` [PATCH v2 4/4] common/log: Fix *_dump_log routines for ext4 Catherine Hoang
2021-10-07 16:15   ` Darrick J. Wong
2021-10-07 18:24     ` [External] : " Catherine Hoang
2021-10-08 17:49   ` Allison Henderson
2021-10-08 19:06     ` Catherine Hoang

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=20211007002641.714906-4-catherine.hoang@oracle.com \
    --to=catherine.hoang@oracle.com \
    --cc=allison.henderson@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@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