]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
vfio: disable filesystem-dax page pinning
authorDan Williams <dan.j.williams@intel.com>
Sun, 4 Feb 2018 18:34:02 +0000 (10:34 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 15 Mar 2018 13:27:43 +0000 (08:27 -0500)
commitacf4a054aecf3999e211baf48e872f14151dc9ad
treeb685229dcd21da1318444e1c1355e1f4e7c2e90d
parent3933ecb5e36b5cd69306063dc2a99a84e9c50577
vfio: disable filesystem-dax page pinning

BugLink: http://bugs.launchpad.net/bugs/1755179
commit 94db151dc89262bfa82922c44e8320cea2334667 upstream.

Filesystem-DAX is incompatible with 'longterm' page pinning. Without
page cache indirection a DAX mapping maps filesystem blocks directly.
This means that the filesystem must not modify a file's block map while
any page in a mapping is pinned. In order to prevent the situation of
userspace holding of filesystem operations indefinitely, disallow
'longterm' Filesystem-DAX mappings.

RDMA has the same conflict and the plan there is to add a 'with lease'
mechanism to allow the kernel to notify userspace that the mapping is
being torn down for block-map maintenance. Perhaps something similar can
be put in place for vfio.

Note that xfs and ext4 still report:

   "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"

...at mount time, and resolving the dax-dma-vs-truncate problem is one
of the last hurdles to remove that designation.

Acked-by: Alex Williamson <alex.williamson@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: kvm@vger.kernel.org
Cc: <stable@vger.kernel.org>
Reported-by: Haozhong Zhang <haozhong.zhang@intel.com>
Tested-by: Haozhong Zhang <haozhong.zhang@intel.com>
Fixes: d475c6346a38 ("dax,ext2: replace XIP read and write with DAX I/O")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/vfio/vfio_iommu_type1.c