]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
generic/081: don't run on DAX capable devices
authorDave Chinner <dchinner@redhat.com>
Thu, 2 Jun 2022 00:31:21 +0000 (10:31 +1000)
committerZorro Lang <zlang@kernel.org>
Fri, 3 Jun 2022 05:17:36 +0000 (13:17 +0800)
commite35f87e97507adf72108b96ec36cea9310d8136a
treee5e6c7e4a7a60a47a79ee574f482bd77ec114a5a
parent41ff2ea0434c6bbc9c6c866bbc3a97df61424027
generic/081: don't run on DAX capable devices

LVM/DM has conniptions when you try to use snapshots on a device
that has DAX capability. It first sets up the underlying device as a
DAX capable mapping (type 3 or DM_TYPE_DAX_BIO_BASED) but because
snapshots require COW and shared mappings, it isn't supported on DAX
capable devices. Hence creating the snapshot device fails because it
requires a type 1 (DM_TYPE_BIO_BASED) device and DM can't change
types on a loaded mapping.

Hence we get this obscure error message in the log:

device-mapper: ioctl: can't change device type (old=3 vs new=1) after initial table load.

and these obscure, unhelpful error messages from the LVM command
outputs:

  device-mapper: reload ioctl on  (251:0) failed: Invalid argument
  Failed to suspend logical volume vg_081/base_081.
  Device vg_081-base_081-real (251:1) is used by another device.
  Failed to revert logical volume vg_081/base_081.
  Aborting. Manual intervention required.
Failed to create snapshot

How to turn off DAX capability is not documented in dmsetup or LVM
man pages, nor is dax mentioned anywhere in
Documentation/admin/device-mapper/ so I have no idea how to tell
LVM/DM "don't try to enable DAX support!".

As such, if the uderlying block device is dax capable, skip this
test.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc