aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorGravatar Dan Williams <dan.j.williams@intel.com> 2021-09-08 15:58:13 -0700
committerGravatar Dan Williams <dan.j.williams@intel.com> 2021-09-08 15:58:13 -0700
commit3fc3725357414636d91be1558ce8b14f228b4bda (patch)
treee16d052bfac4a5c2da1c9a16cb871e263bfeca3e /fs/xfs
parentlibnvdimm/pmem: Fix crash triggered when I/O in-flight during unbind (diff)
parentdax: remove bdev_dax_supported (diff)
downloadlinux-3fc3725357414636d91be1558ce8b14f228b4bda.tar.gz
linux-3fc3725357414636d91be1558ce8b14f228b4bda.tar.bz2
linux-3fc3725357414636d91be1558ce8b14f228b4bda.zip
Merge branch 'for-5.15/fsdax-cleanups' into for-5.15/libnvdimm
Include Christoph's rework of the dax_supported() helpers in the v5.15 libnvdimm update. This supports the ongoing dax-reflink enabling effort.
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_super.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 2c9e26a44546..f4384974e52a 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -314,6 +314,15 @@ xfs_set_inode_alloc(
return (mp->m_flags & XFS_MOUNT_32BITINODES) ? maxagi : agcount;
}
+static bool
+xfs_buftarg_is_dax(
+ struct super_block *sb,
+ struct xfs_buftarg *bt)
+{
+ return dax_supported(bt->bt_daxdev, bt->bt_bdev, sb->s_blocksize, 0,
+ bdev_nr_sectors(bt->bt_bdev));
+}
+
STATIC int
xfs_blkdev_get(
xfs_mount_t *mp,
@@ -1549,11 +1558,10 @@ xfs_fs_fill_super(
xfs_warn(mp,
"DAX enabled. Warning: EXPERIMENTAL, use at your own risk");
- datadev_is_dax = bdev_dax_supported(mp->m_ddev_targp->bt_bdev,
- sb->s_blocksize);
+ datadev_is_dax = xfs_buftarg_is_dax(sb, mp->m_ddev_targp);
if (mp->m_rtdev_targp)
- rtdev_is_dax = bdev_dax_supported(
- mp->m_rtdev_targp->bt_bdev, sb->s_blocksize);
+ rtdev_is_dax = xfs_buftarg_is_dax(sb,
+ mp->m_rtdev_targp);
if (!rtdev_is_dax && !datadev_is_dax) {
xfs_alert(mp,
"DAX unsupported by block device. Turning off DAX.");