* [PATCH v2 0/4] Dump log cleanups
@ 2021-10-07 0:26 Catherine Hoang
2021-10-07 0:26 ` [PATCH v2 1/4] xfstests: Rename _scratch_inject_logprint to _scratch_remount_dump_log Catherine Hoang
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Catherine Hoang @ 2021-10-07 0:26 UTC (permalink / raw)
To: linux-xfs, fstests; +Cc: allison.henderson
Hi all,
This cleanup set is a followup to the log attribute replay test that was
posted here:
https://lore.kernel.org/linux-xfs/20210901221006.125888-2-catherine.hoang@oracle.com/
This set renames the *_inject_logprint functions to *_remount_dump_log
and moves them to common/log.
Questions and feedback are appreciated!
Catherine
Catherine Hoang (4):
xfstests: Rename _scratch_inject_logprint to _scratch_remount_dump_log
xfstests: Rename _test_inject_logprint to _test_remount_dump_log
common/log: Move *_dump_log routines to common/log
common/log: Fix *_dump_log routines for ext4
common/inject | 26 --------------------------
common/log | 30 ++++++++++++++++++++++++++++--
tests/xfs/312 | 2 +-
tests/xfs/313 | 2 +-
tests/xfs/314 | 2 +-
tests/xfs/315 | 2 +-
tests/xfs/316 | 2 +-
tests/xfs/317 | 2 +-
tests/xfs/318 | 2 +-
tests/xfs/319 | 2 +-
tests/xfs/320 | 2 +-
tests/xfs/321 | 2 +-
tests/xfs/322 | 2 +-
tests/xfs/323 | 2 +-
tests/xfs/324 | 2 +-
tests/xfs/325 | 2 +-
tests/xfs/326 | 2 +-
tests/xfs/329 | 2 +-
18 files changed, 44 insertions(+), 44 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/4] xfstests: Rename _scratch_inject_logprint to _scratch_remount_dump_log
2021-10-07 0:26 [PATCH v2 0/4] Dump log cleanups Catherine Hoang
@ 2021-10-07 0:26 ` 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
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Catherine Hoang @ 2021-10-07 0:26 UTC (permalink / raw)
To: linux-xfs, fstests; +Cc: allison.henderson
Rename _scratch_inject_logprint to _scratch_remount_dump_log to better
describe what this function does. _scratch_remount_dump_log unmounts
and remounts the scratch device, dumping the log.
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
---
common/inject | 2 +-
tests/xfs/312 | 2 +-
tests/xfs/313 | 2 +-
tests/xfs/314 | 2 +-
tests/xfs/315 | 2 +-
tests/xfs/316 | 2 +-
tests/xfs/317 | 2 +-
tests/xfs/318 | 2 +-
tests/xfs/319 | 2 +-
tests/xfs/320 | 2 +-
tests/xfs/321 | 2 +-
tests/xfs/322 | 2 +-
tests/xfs/323 | 2 +-
tests/xfs/324 | 2 +-
tests/xfs/325 | 2 +-
tests/xfs/326 | 2 +-
tests/xfs/329 | 2 +-
17 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/common/inject b/common/inject
index 984ec209..3b731df7 100644
--- a/common/inject
+++ b/common/inject
@@ -113,7 +113,7 @@ _scratch_inject_error()
}
# Unmount and remount the scratch device, dumping the log
-_scratch_inject_logprint()
+_scratch_remount_dump_log()
{
local opts="$1"
diff --git a/tests/xfs/312 b/tests/xfs/312
index 1fcf26ab..94f868fe 100755
--- a/tests/xfs/312
+++ b/tests/xfs/312
@@ -63,7 +63,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "FS should be online, touch should succeed"
touch $SCRATCH_MNT/goodfs
diff --git a/tests/xfs/313 b/tests/xfs/313
index 6d2f9fac..9c7cf5b9 100755
--- a/tests/xfs/313
+++ b/tests/xfs/313
@@ -63,7 +63,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "FS should be online, touch should succeed"
touch $SCRATCH_MNT/goodfs
diff --git a/tests/xfs/314 b/tests/xfs/314
index 5165393e..9ac311d0 100755
--- a/tests/xfs/314
+++ b/tests/xfs/314
@@ -64,7 +64,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "FS should be online, touch should succeed"
touch $SCRATCH_MNT/goodfs
diff --git a/tests/xfs/315 b/tests/xfs/315
index 958a8c99..105515ab 100755
--- a/tests/xfs/315
+++ b/tests/xfs/315
@@ -61,7 +61,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "FS should be online, touch should succeed"
touch $SCRATCH_MNT/goodfs
diff --git a/tests/xfs/316 b/tests/xfs/316
index cf0c5adc..f0af19d2 100755
--- a/tests/xfs/316
+++ b/tests/xfs/316
@@ -61,7 +61,7 @@ echo "CoW all the blocks"
$XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz 0 $((blks * blksz))" $SCRATCH_MNT/file2 >> $seqres.full
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "FS should be online, touch should succeed"
touch $SCRATCH_MNT/goodfs
diff --git a/tests/xfs/317 b/tests/xfs/317
index 7eef67af..1ca2672d 100755
--- a/tests/xfs/317
+++ b/tests/xfs/317
@@ -54,7 +54,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "Check files"
md5sum $SCRATCH_MNT/file0 | _filter_scratch
diff --git a/tests/xfs/318 b/tests/xfs/318
index d822e89a..38c7aa60 100755
--- a/tests/xfs/318
+++ b/tests/xfs/318
@@ -60,7 +60,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "Check files"
md5sum $SCRATCH_MNT/file1 2>&1 | _filter_scratch
diff --git a/tests/xfs/319 b/tests/xfs/319
index 0f61c119..d64651fb 100755
--- a/tests/xfs/319
+++ b/tests/xfs/319
@@ -57,7 +57,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "FS should be online, touch should succeed"
touch $SCRATCH_MNT/goodfs
diff --git a/tests/xfs/320 b/tests/xfs/320
index f65f3ad1..d22d76d9 100755
--- a/tests/xfs/320
+++ b/tests/xfs/320
@@ -55,7 +55,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "Check files"
md5sum $SCRATCH_MNT/file1 | _filter_scratch
diff --git a/tests/xfs/321 b/tests/xfs/321
index daff4449..06a34347 100755
--- a/tests/xfs/321
+++ b/tests/xfs/321
@@ -55,7 +55,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "Check files"
md5sum $SCRATCH_MNT/file1 | _filter_scratch
diff --git a/tests/xfs/322 b/tests/xfs/322
index f36e54d8..89a2f741 100755
--- a/tests/xfs/322
+++ b/tests/xfs/322
@@ -56,7 +56,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "Check files"
md5sum $SCRATCH_MNT/file1 | _filter_scratch
diff --git a/tests/xfs/323 b/tests/xfs/323
index f66a8ebf..66737da0 100755
--- a/tests/xfs/323
+++ b/tests/xfs/323
@@ -55,7 +55,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "FS should be online, touch should succeed"
touch $SCRATCH_MNT/goodfs
diff --git a/tests/xfs/324 b/tests/xfs/324
index ca2f25ac..9909db62 100755
--- a/tests/xfs/324
+++ b/tests/xfs/324
@@ -61,7 +61,7 @@ echo "Reflink all the blocks"
_cp_reflink $SCRATCH_MNT/file1 $SCRATCH_MNT/file4
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "FS should be online, touch should succeed"
touch $SCRATCH_MNT/goodfs
diff --git a/tests/xfs/325 b/tests/xfs/325
index 3b98fd50..5b26b2b3 100755
--- a/tests/xfs/325
+++ b/tests/xfs/325
@@ -59,7 +59,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "FS should be online, touch should succeed"
touch $SCRATCH_MNT/goodfs
diff --git a/tests/xfs/326 b/tests/xfs/326
index bf5db08a..8b95a18a 100755
--- a/tests/xfs/326
+++ b/tests/xfs/326
@@ -71,7 +71,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log"
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
echo "FS should be online, touch should succeed"
touch $SCRATCH_MNT/goodfs
diff --git a/tests/xfs/329 b/tests/xfs/329
index e57f6f7f..e9a30d05 100755
--- a/tests/xfs/329
+++ b/tests/xfs/329
@@ -52,7 +52,7 @@ echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
echo "Remount to replay log" | tee /dev/ttyprintk
-_scratch_inject_logprint >> $seqres.full
+_scratch_remount_dump_log >> $seqres.full
new_nextents=$(_count_extents $testdir/file1)
echo "Check extent count" | tee /dev/ttyprintk
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/4] xfstests: Rename _test_inject_logprint to _test_remount_dump_log
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 0:26 ` Catherine Hoang
2021-10-07 16:19 ` Darrick J. Wong
2021-10-07 0:26 ` [PATCH v2 3/4] common/log: Move *_dump_log routines to common/log Catherine Hoang
2021-10-07 0:26 ` [PATCH v2 4/4] common/log: Fix *_dump_log routines for ext4 Catherine Hoang
3 siblings, 1 reply; 12+ messages in thread
From: Catherine Hoang @ 2021-10-07 0:26 UTC (permalink / raw)
To: linux-xfs, fstests; +Cc: allison.henderson
Rename _test_inject_logprint to _test_remount_dump_log to better
describe what this function does. _test_remount_dump_log unmounts
and remounts the test device, dumping the log.
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
---
common/inject | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/inject b/common/inject
index 3b731df7..b5334d4a 100644
--- a/common/inject
+++ b/common/inject
@@ -126,7 +126,7 @@ _scratch_remount_dump_log()
}
# Unmount and remount the test device, dumping the log
-_test_inject_logprint()
+_test_remount_dump_log()
{
local opts="$1"
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 3/4] common/log: Move *_dump_log routines to common/log
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 0:26 ` [PATCH v2 2/4] xfstests: Rename _test_inject_logprint to _test_remount_dump_log Catherine Hoang
@ 2021-10-07 0:26 ` Catherine Hoang
2021-10-07 16:19 ` Darrick J. Wong
2021-10-07 0:26 ` [PATCH v2 4/4] common/log: Fix *_dump_log routines for ext4 Catherine Hoang
3 siblings, 1 reply; 12+ messages in thread
From: Catherine Hoang @ 2021-10-07 0:26 UTC (permalink / raw)
To: linux-xfs, fstests; +Cc: allison.henderson
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 4/4] common/log: Fix *_dump_log routines for ext4
2021-10-07 0:26 [PATCH v2 0/4] Dump log cleanups Catherine Hoang
` (2 preceding siblings ...)
2021-10-07 0:26 ` [PATCH v2 3/4] common/log: Move *_dump_log routines to common/log Catherine Hoang
@ 2021-10-07 0:26 ` Catherine Hoang
2021-10-07 16:15 ` Darrick J. Wong
2021-10-08 17:49 ` Allison Henderson
3 siblings, 2 replies; 12+ messages in thread
From: Catherine Hoang @ 2021-10-07 0:26 UTC (permalink / raw)
To: linux-xfs, fstests; +Cc: allison.henderson
dumpe2fs -h displays the superblock contents, not the journal contents.
Use the logdump utility to dump the contents of the journal.
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
---
common/log | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/log b/common/log
index 0a9aaa7f..154f3959 100644
--- a/common/log
+++ b/common/log
@@ -229,7 +229,7 @@ _scratch_dump_log()
$DUMP_F2FS_PROG $SCRATCH_DEV
;;
ext4)
- $DUMPE2FS_PROG -h $SCRATCH_DEV
+ $DEBUGFS_PROG -R "logdump -a" $SCRATCH_DEV
;;
*)
;;
@@ -246,7 +246,7 @@ _test_dump_log()
$DUMP_F2FS_PROG $TEST_DEV
;;
ext4)
- $DUMPE2FS_PROG -h $TEST_DEV
+ $DEBUGFS_PROG -R "logdump -a" $TEST_DEV
;;
*)
;;
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 4/4] common/log: Fix *_dump_log routines for ext4
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
1 sibling, 1 reply; 12+ messages in thread
From: Darrick J. Wong @ 2021-10-07 16:15 UTC (permalink / raw)
To: Catherine Hoang; +Cc: linux-xfs, fstests, allison.henderson
On Thu, Oct 07, 2021 at 12:26:41AM +0000, Catherine Hoang wrote:
> dumpe2fs -h displays the superblock contents, not the journal contents.
> Use the logdump utility to dump the contents of the journal.
>
> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
> ---
> common/log | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/common/log b/common/log
> index 0a9aaa7f..154f3959 100644
> --- a/common/log
> +++ b/common/log
> @@ -229,7 +229,7 @@ _scratch_dump_log()
> $DUMP_F2FS_PROG $SCRATCH_DEV
> ;;
> ext4)
> - $DUMPE2FS_PROG -h $SCRATCH_DEV
> + $DEBUGFS_PROG -R "logdump -a" $SCRATCH_DEV
Hmm. Some of the tests call _require_command on various e2fsprogs
programs. However, debugfs has been a part of e2fsprogs since forever
and e2fsprogs is a required fstests dependency, so I guess those
callsites are unnecessary (but otherwise benign). For that matter, I
think e2fsprogs is an 'essential' package on Debian and almost always
installed by Linux distros. I think that means it's safe to assume that
debugfs is present.
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ;;
> *)
> ;;
> @@ -246,7 +246,7 @@ _test_dump_log()
> $DUMP_F2FS_PROG $TEST_DEV
> ;;
> ext4)
> - $DUMPE2FS_PROG -h $TEST_DEV
> + $DEBUGFS_PROG -R "logdump -a" $TEST_DEV
> ;;
> *)
> ;;
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 3/4] common/log: Move *_dump_log routines to common/log
2021-10-07 0:26 ` [PATCH v2 3/4] common/log: Move *_dump_log routines to common/log Catherine Hoang
@ 2021-10-07 16:19 ` Darrick J. Wong
0 siblings, 0 replies; 12+ messages in thread
From: Darrick J. Wong @ 2021-10-07 16:19 UTC (permalink / raw)
To: Catherine Hoang; +Cc: linux-xfs, fstests, allison.henderson
On Thu, Oct 07, 2021 at 12:26:40AM +0000, Catherine Hoang wrote:
> 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.
Doesn't this mean that all those tests that got changed in the first
patch will also need an update to source common/log?
OH, right, common/inject sources common/log. Problem solved.
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
>
> 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
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/4] xfstests: Rename _test_inject_logprint to _test_remount_dump_log
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
0 siblings, 0 replies; 12+ messages in thread
From: Darrick J. Wong @ 2021-10-07 16:19 UTC (permalink / raw)
To: Catherine Hoang; +Cc: linux-xfs, fstests, allison.henderson
On Thu, Oct 07, 2021 at 12:26:39AM +0000, Catherine Hoang wrote:
> Rename _test_inject_logprint to _test_remount_dump_log to better
> describe what this function does. _test_remount_dump_log unmounts
> and remounts the test device, dumping the log.
>
> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
> Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> common/inject | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/inject b/common/inject
> index 3b731df7..b5334d4a 100644
> --- a/common/inject
> +++ b/common/inject
> @@ -126,7 +126,7 @@ _scratch_remount_dump_log()
> }
>
> # Unmount and remount the test device, dumping the log
> -_test_inject_logprint()
> +_test_remount_dump_log()
> {
> local opts="$1"
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/4] xfstests: Rename _scratch_inject_logprint to _scratch_remount_dump_log
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
0 siblings, 0 replies; 12+ messages in thread
From: Darrick J. Wong @ 2021-10-07 16:20 UTC (permalink / raw)
To: Catherine Hoang; +Cc: linux-xfs, fstests, allison.henderson
On Thu, Oct 07, 2021 at 12:26:38AM +0000, Catherine Hoang wrote:
> Rename _scratch_inject_logprint to _scratch_remount_dump_log to better
> describe what this function does. _scratch_remount_dump_log unmounts
> and remounts the scratch device, dumping the log.
>
> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
> Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Looks straightforward,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> common/inject | 2 +-
> tests/xfs/312 | 2 +-
> tests/xfs/313 | 2 +-
> tests/xfs/314 | 2 +-
> tests/xfs/315 | 2 +-
> tests/xfs/316 | 2 +-
> tests/xfs/317 | 2 +-
> tests/xfs/318 | 2 +-
> tests/xfs/319 | 2 +-
> tests/xfs/320 | 2 +-
> tests/xfs/321 | 2 +-
> tests/xfs/322 | 2 +-
> tests/xfs/323 | 2 +-
> tests/xfs/324 | 2 +-
> tests/xfs/325 | 2 +-
> tests/xfs/326 | 2 +-
> tests/xfs/329 | 2 +-
> 17 files changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/common/inject b/common/inject
> index 984ec209..3b731df7 100644
> --- a/common/inject
> +++ b/common/inject
> @@ -113,7 +113,7 @@ _scratch_inject_error()
> }
>
> # Unmount and remount the scratch device, dumping the log
> -_scratch_inject_logprint()
> +_scratch_remount_dump_log()
> {
> local opts="$1"
>
> diff --git a/tests/xfs/312 b/tests/xfs/312
> index 1fcf26ab..94f868fe 100755
> --- a/tests/xfs/312
> +++ b/tests/xfs/312
> @@ -63,7 +63,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "FS should be online, touch should succeed"
> touch $SCRATCH_MNT/goodfs
> diff --git a/tests/xfs/313 b/tests/xfs/313
> index 6d2f9fac..9c7cf5b9 100755
> --- a/tests/xfs/313
> +++ b/tests/xfs/313
> @@ -63,7 +63,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "FS should be online, touch should succeed"
> touch $SCRATCH_MNT/goodfs
> diff --git a/tests/xfs/314 b/tests/xfs/314
> index 5165393e..9ac311d0 100755
> --- a/tests/xfs/314
> +++ b/tests/xfs/314
> @@ -64,7 +64,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "FS should be online, touch should succeed"
> touch $SCRATCH_MNT/goodfs
> diff --git a/tests/xfs/315 b/tests/xfs/315
> index 958a8c99..105515ab 100755
> --- a/tests/xfs/315
> +++ b/tests/xfs/315
> @@ -61,7 +61,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "FS should be online, touch should succeed"
> touch $SCRATCH_MNT/goodfs
> diff --git a/tests/xfs/316 b/tests/xfs/316
> index cf0c5adc..f0af19d2 100755
> --- a/tests/xfs/316
> +++ b/tests/xfs/316
> @@ -61,7 +61,7 @@ echo "CoW all the blocks"
> $XFS_IO_PROG -c "pwrite -W -S 0x67 -b $sz 0 $((blks * blksz))" $SCRATCH_MNT/file2 >> $seqres.full
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "FS should be online, touch should succeed"
> touch $SCRATCH_MNT/goodfs
> diff --git a/tests/xfs/317 b/tests/xfs/317
> index 7eef67af..1ca2672d 100755
> --- a/tests/xfs/317
> +++ b/tests/xfs/317
> @@ -54,7 +54,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "Check files"
> md5sum $SCRATCH_MNT/file0 | _filter_scratch
> diff --git a/tests/xfs/318 b/tests/xfs/318
> index d822e89a..38c7aa60 100755
> --- a/tests/xfs/318
> +++ b/tests/xfs/318
> @@ -60,7 +60,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "Check files"
> md5sum $SCRATCH_MNT/file1 2>&1 | _filter_scratch
> diff --git a/tests/xfs/319 b/tests/xfs/319
> index 0f61c119..d64651fb 100755
> --- a/tests/xfs/319
> +++ b/tests/xfs/319
> @@ -57,7 +57,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "FS should be online, touch should succeed"
> touch $SCRATCH_MNT/goodfs
> diff --git a/tests/xfs/320 b/tests/xfs/320
> index f65f3ad1..d22d76d9 100755
> --- a/tests/xfs/320
> +++ b/tests/xfs/320
> @@ -55,7 +55,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "Check files"
> md5sum $SCRATCH_MNT/file1 | _filter_scratch
> diff --git a/tests/xfs/321 b/tests/xfs/321
> index daff4449..06a34347 100755
> --- a/tests/xfs/321
> +++ b/tests/xfs/321
> @@ -55,7 +55,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "Check files"
> md5sum $SCRATCH_MNT/file1 | _filter_scratch
> diff --git a/tests/xfs/322 b/tests/xfs/322
> index f36e54d8..89a2f741 100755
> --- a/tests/xfs/322
> +++ b/tests/xfs/322
> @@ -56,7 +56,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "Check files"
> md5sum $SCRATCH_MNT/file1 | _filter_scratch
> diff --git a/tests/xfs/323 b/tests/xfs/323
> index f66a8ebf..66737da0 100755
> --- a/tests/xfs/323
> +++ b/tests/xfs/323
> @@ -55,7 +55,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "FS should be online, touch should succeed"
> touch $SCRATCH_MNT/goodfs
> diff --git a/tests/xfs/324 b/tests/xfs/324
> index ca2f25ac..9909db62 100755
> --- a/tests/xfs/324
> +++ b/tests/xfs/324
> @@ -61,7 +61,7 @@ echo "Reflink all the blocks"
> _cp_reflink $SCRATCH_MNT/file1 $SCRATCH_MNT/file4
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "FS should be online, touch should succeed"
> touch $SCRATCH_MNT/goodfs
> diff --git a/tests/xfs/325 b/tests/xfs/325
> index 3b98fd50..5b26b2b3 100755
> --- a/tests/xfs/325
> +++ b/tests/xfs/325
> @@ -59,7 +59,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "FS should be online, touch should succeed"
> touch $SCRATCH_MNT/goodfs
> diff --git a/tests/xfs/326 b/tests/xfs/326
> index bf5db08a..8b95a18a 100755
> --- a/tests/xfs/326
> +++ b/tests/xfs/326
> @@ -71,7 +71,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log"
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
>
> echo "FS should be online, touch should succeed"
> touch $SCRATCH_MNT/goodfs
> diff --git a/tests/xfs/329 b/tests/xfs/329
> index e57f6f7f..e9a30d05 100755
> --- a/tests/xfs/329
> +++ b/tests/xfs/329
> @@ -52,7 +52,7 @@ echo "FS should be shut down, touch will fail"
> touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
>
> echo "Remount to replay log" | tee /dev/ttyprintk
> -_scratch_inject_logprint >> $seqres.full
> +_scratch_remount_dump_log >> $seqres.full
> new_nextents=$(_count_extents $testdir/file1)
>
> echo "Check extent count" | tee /dev/ttyprintk
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [External] : Re: [PATCH v2 4/4] common/log: Fix *_dump_log routines for ext4
2021-10-07 16:15 ` Darrick J. Wong
@ 2021-10-07 18:24 ` Catherine Hoang
0 siblings, 0 replies; 12+ messages in thread
From: Catherine Hoang @ 2021-10-07 18:24 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs, fstests, Allison Henderson
> On Oct 7, 2021, at 9:15 AM, Darrick J. Wong <djwong@kernel.org> wrote:
>
> On Thu, Oct 07, 2021 at 12:26:41AM +0000, Catherine Hoang wrote:
>> dumpe2fs -h displays the superblock contents, not the journal contents.
>> Use the logdump utility to dump the contents of the journal.
>>
>> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
>> ---
>> common/log | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/common/log b/common/log
>> index 0a9aaa7f..154f3959 100644
>> --- a/common/log
>> +++ b/common/log
>> @@ -229,7 +229,7 @@ _scratch_dump_log()
>> $DUMP_F2FS_PROG $SCRATCH_DEV
>> ;;
>> ext4)
>> - $DUMPE2FS_PROG -h $SCRATCH_DEV
>> + $DEBUGFS_PROG -R "logdump -a" $SCRATCH_DEV
>
> Hmm. Some of the tests call _require_command on various e2fsprogs
> programs. However, debugfs has been a part of e2fsprogs since forever
> and e2fsprogs is a required fstests dependency, so I guess those
> callsites are unnecessary (but otherwise benign). For that matter, I
> think e2fsprogs is an 'essential' package on Debian and almost always
> installed by Linux distros. I think that means it's safe to assume that
> debugfs is present.
>
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
>
> —D
Thanks for the reviews Darrick!
Catherine
>
>
>> ;;
>> *)
>> ;;
>> @@ -246,7 +246,7 @@ _test_dump_log()
>> $DUMP_F2FS_PROG $TEST_DEV
>> ;;
>> ext4)
>> - $DUMPE2FS_PROG -h $TEST_DEV
>> + $DEBUGFS_PROG -R "logdump -a" $TEST_DEV
>> ;;
>> *)
>> ;;
>> --
>> 2.25.1
>>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 4/4] common/log: Fix *_dump_log routines for ext4
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-08 17:49 ` Allison Henderson
2021-10-08 19:06 ` Catherine Hoang
1 sibling, 1 reply; 12+ messages in thread
From: Allison Henderson @ 2021-10-08 17:49 UTC (permalink / raw)
To: Catherine Hoang, linux-xfs, fstests
On 10/6/21 5:26 PM, Catherine Hoang wrote:
> dumpe2fs -h displays the superblock contents, not the journal contents.
> Use the logdump utility to dump the contents of the journal.
>
> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Looks good to me. Thanks for the fix
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
> ---
> common/log | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/common/log b/common/log
> index 0a9aaa7f..154f3959 100644
> --- a/common/log
> +++ b/common/log
> @@ -229,7 +229,7 @@ _scratch_dump_log()
> $DUMP_F2FS_PROG $SCRATCH_DEV
> ;;
> ext4)
> - $DUMPE2FS_PROG -h $SCRATCH_DEV
> + $DEBUGFS_PROG -R "logdump -a" $SCRATCH_DEV
> ;;
> *)
> ;;
> @@ -246,7 +246,7 @@ _test_dump_log()
> $DUMP_F2FS_PROG $TEST_DEV
> ;;
> ext4)
> - $DUMPE2FS_PROG -h $TEST_DEV
> + $DEBUGFS_PROG -R "logdump -a" $TEST_DEV
> ;;
> *)
> ;;
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 4/4] common/log: Fix *_dump_log routines for ext4
2021-10-08 17:49 ` Allison Henderson
@ 2021-10-08 19:06 ` Catherine Hoang
0 siblings, 0 replies; 12+ messages in thread
From: Catherine Hoang @ 2021-10-08 19:06 UTC (permalink / raw)
To: Allison Henderson; +Cc: linux-xfs, fstests
> On Oct 8, 2021, at 10:49 AM, Allison Henderson <allison.henderson@oracle.com> wrote:
>
>
>
> On 10/6/21 5:26 PM, Catherine Hoang wrote:
>> dumpe2fs -h displays the superblock contents, not the journal contents.
>> Use the logdump utility to dump the contents of the journal.
>> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
> Looks good to me. Thanks for the fix
> Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Thanks for the review!
Catherine
>
>> ---
>> common/log | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>> diff --git a/common/log b/common/log
>> index 0a9aaa7f..154f3959 100644
>> --- a/common/log
>> +++ b/common/log
>> @@ -229,7 +229,7 @@ _scratch_dump_log()
>> $DUMP_F2FS_PROG $SCRATCH_DEV
>> ;;
>> ext4)
>> - $DUMPE2FS_PROG -h $SCRATCH_DEV
>> + $DEBUGFS_PROG -R "logdump -a" $SCRATCH_DEV
>> ;;
>> *)
>> ;;
>> @@ -246,7 +246,7 @@ _test_dump_log()
>> $DUMP_F2FS_PROG $TEST_DEV
>> ;;
>> ext4)
>> - $DUMPE2FS_PROG -h $TEST_DEV
>> + $DEBUGFS_PROG -R "logdump -a" $TEST_DEV
>> ;;
>> *)
>> ;;
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-10-08 19:06 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v2 3/4] common/log: Move *_dump_log routines to common/log Catherine Hoang
2021-10-07 16:19 ` 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
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.