All of lore.kernel.org
 help / color / mirror / Atom feed
From: "yangx.jy@fujitsu.com" <yangx.jy@fujitsu.com>
To: "fstests@vger.kernel.org" <fstests@vger.kernel.org>
Cc: "zlang@kernel.org" <zlang@kernel.org>,
	"djwong@kernel.org" <djwong@kernel.org>,
	"bfoster@redhat.com" <bfoster@redhat.com>,
	"ruansy.fnst@fujitsu.com" <ruansy.fnst@fujitsu.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"yangx.jy@fujitsu.com" <yangx.jy@fujitsu.com>
Subject: [PATCH] Revert "generic/470: use thin volume for dmlogwrites target device"
Date: Wed, 14 Sep 2022 09:06:37 +0000	[thread overview]
Message-ID: <20220914090625.32207-1-yangx.jy@fujitsu.com> (raw)

This reverts commit fc5870da485aec0f9196a0f2bed32f73f6b2c664

generic/470 was original designed to verify mmap(MAP_SYNC) on the
log-writes device enabling DAX. As a result, we need to ensure that
all underlying devices under the log-writes device support DAX.
However the thin-volume device never supports DAX so generic/470
with the dm-thin device always gets "[not run] Cannot use thin-pool
devices on DAX capable block devices".

Besides, mmap(MAP_SYNC) will throw "mmap: Operation not supported"
even if we make generic/470 continue unconditionally.

Please see the difference between old and new logic:

          old logic                       new logic
------------------------------------------------------------
 log-writes device(DAX)              log-writes device(DAX)
           |                                   |
PMEM0(DAX) + PMEM1(DAX)   thin-volume(non-DAX) + PMEM1(DAX)
                                  |
                                PMEM0(DAX)
------------------------------------------------------------

I think it is wrong for generic/470 to use thin volume.

Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
---
 tests/generic/470 | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/tests/generic/470 b/tests/generic/470
index f3407511..93a6e3f4 100755
--- a/tests/generic/470
+++ b/tests/generic/470
@@ -15,33 +15,22 @@ _cleanup()
 {
 	cd /
 	_log_writes_cleanup
-	_dmthin_cleanup
 	rm -f $tmp.*
 }
 
 # Import common functions.
 . ./common/filter
-. ./common/dmthin
 . ./common/dmlogwrites
 
 # real QA test starts here
 _supported_fs generic
-_require_scratch_nocheck
+_require_scratch
 _require_no_logdev
 _require_log_writes_dax_mountopt "dax"
-_require_dm_target thin-pool
 _require_xfs_io_command "mmap" "-S"
 _require_xfs_io_command "log_writes"
 
-devsize=$((1024*1024*200 / 512))        # 200m phys/virt size
-csize=$((1024*64 / 512))                # 64k cluster size
-lowspace=$((1024*1024 / 512))           # 1m low space threshold
-
-# Use a thin device to provide deterministic discard behavior. Discards are used
-# by the log replay tool for fast zeroing to prevent out-of-order replay issues.
-_dmthin_init $devsize $devsize $csize $lowspace
-
-_log_writes_init $DMTHIN_VOL_DEV
+_log_writes_init $SCRATCH_DEV
 _log_writes_mkfs >> $seqres.full 2>&1
 _log_writes_mount -o dax
 
@@ -54,14 +43,14 @@ $XFS_IO_PROG -t -c "truncate $LEN" -c "mmap -S 0 $LEN" -c "mwrite 0 $LEN" \
 # Unmount the scratch dir and tear down the log writes target
 _log_writes_unmount
 _log_writes_remove
-_dmthin_check_fs
+_check_scratch_fs
 
 # destroy previous filesystem so we can be sure our rebuild works
-_mkfs_dev $DMTHIN_VOL_DEV >> $seqres.full 2>&1
+_scratch_mkfs >> $seqres.full 2>&1
 
 # check pre-unmap state
-_log_writes_replay_log preunmap $DMTHIN_VOL_DEV
-_dmthin_mount
+_log_writes_replay_log preunmap $SCRATCH_DEV
+_scratch_mount
 
 # We should see $SCRATCH_MNT/test as having 1 MiB in block allocations
 du -sh $SCRATCH_MNT/test | _filter_scratch | _filter_spaces
-- 
2.34.1

                 reply	other threads:[~2022-09-14  9:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220914090625.32207-1-yangx.jy@fujitsu.com \
    --to=yangx.jy@fujitsu.com \
    --cc=bfoster@redhat.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ruansy.fnst@fujitsu.com \
    --cc=zlang@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.