Commit 35fcd75a authored by Shiyang Ruan's avatar Shiyang Ruan Committed by akpm

xfs: fail dax mount if reflink is enabled on a partition

Failure notification is not supported on partitions.  So, when we mount a
reflink enabled xfs on a partition with dax option, let it fail with
-EINVAL code.

Link: https://lkml.kernel.org/r/20220609143435.393724-1-ruansy.fnst@fujitsu.comSigned-off-by: default avatarShiyang Ruan <ruansy.fnst@fujitsu.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 873f64b7
...@@ -350,8 +350,10 @@ xfs_setup_dax_always( ...@@ -350,8 +350,10 @@ xfs_setup_dax_always(
goto disable_dax; goto disable_dax;
} }
if (xfs_has_reflink(mp)) { if (xfs_has_reflink(mp) &&
xfs_alert(mp, "DAX and reflink cannot be used together!"); bdev_is_partition(mp->m_ddev_targp->bt_bdev)) {
xfs_alert(mp,
"DAX and reflink cannot work with multi-partitions!");
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment