diff options
-rw-r--r-- | fs/xfs/xfs_super.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 187e14b696c2..39f4e6ab3d36 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -1558,14 +1558,12 @@ xfs_fs_fill_super( | |||
1558 | 1558 | ||
1559 | if (mp->m_flags & XFS_MOUNT_DAX) { | 1559 | if (mp->m_flags & XFS_MOUNT_DAX) { |
1560 | xfs_warn(mp, | 1560 | xfs_warn(mp, |
1561 | "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"); | 1561 | "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"); |
1562 | if (sb->s_blocksize != PAGE_SIZE) { | 1562 | |
1563 | xfs_alert(mp, | 1563 | error = bdev_dax_supported(sb, sb->s_blocksize); |
1564 | "Filesystem block size invalid for DAX Turning DAX off."); | 1564 | if (error) { |
1565 | mp->m_flags &= ~XFS_MOUNT_DAX; | ||
1566 | } else if (!sb->s_bdev->bd_disk->fops->direct_access) { | ||
1567 | xfs_alert(mp, | 1565 | xfs_alert(mp, |
1568 | "Block device does not support DAX Turning DAX off."); | 1566 | "DAX unsupported by block device. Turning off DAX."); |
1569 | mp->m_flags &= ~XFS_MOUNT_DAX; | 1567 | mp->m_flags &= ~XFS_MOUNT_DAX; |
1570 | } | 1568 | } |
1571 | } | 1569 | } |