mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common/rc: fix detection of device-mapper/persistent memory incompatibility
In commitfc7b3903, we tried to make _require_dm_target smart enough to _notrun tests that require a device mapper target that isn't compatible with "DAX". However, as of this writing, the incompatibility stems from device mapper's unwillingness to switch access modes when running atop DAX (persistent memory) devices, and has nothing to do with the filesystem mount options. Since filesystems supporting DAX don't universally require "dax" in the mount options to enable that functionality, switch the test to query sysfs to see if the scratch device supports DAX. Fixes:fc7b3903("dax/dm: disable testing on devices that don't support dax") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
5c076a5adb
commit
e05491b341
@@ -1889,7 +1889,8 @@ _require_dm_target()
|
||||
_require_sane_bdev_flush $SCRATCH_DEV
|
||||
_require_command "$DMSETUP_PROG" dmsetup
|
||||
|
||||
_normalize_mount_options | egrep -q "dax(=always| |$)"
|
||||
_normalize_mount_options | egrep -q "dax(=always| |$)" || \
|
||||
test -e "/sys/block/$(_short_dev $SCRATCH_DEV)/dax"
|
||||
if [ $? -eq 0 ]; then
|
||||
case $target in
|
||||
stripe|linear|log-writes)
|
||||
|
||||
Reference in New Issue
Block a user