linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs: fail dax mount if reflink is enabled on a partition
@ 2022-06-09 14:34 Shiyang Ruan
  2022-06-10  5:46 ` Christoph Hellwig
  2022-07-01  0:31 ` Darrick J. Wong
  0 siblings, 2 replies; 41+ messages in thread
From: Shiyang Ruan @ 2022-06-09 14:34 UTC (permalink / raw)
  To: linux-kernel, linux-xfs, nvdimm, linux-fsdevel; +Cc: djwong, david, hch

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.

Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
---
 fs/xfs/xfs_super.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 8495ef076ffc..a3c221841fa6 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -348,8 +348,10 @@ xfs_setup_dax_always(
 		goto disable_dax;
 	}
 
-	if (xfs_has_reflink(mp)) {
-		xfs_alert(mp, "DAX and reflink cannot be used together!");
+	if (xfs_has_reflink(mp) &&
+	    bdev_is_partition(mp->m_ddev_targp->bt_bdev)) {
+		xfs_alert(mp,
+			"DAX and reflink cannot work with multi-partitions!");
 		return -EINVAL;
 	}
 
-- 
2.36.1




^ permalink raw reply related	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2022-11-03  2:32 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 14:34 [PATCH] xfs: fail dax mount if reflink is enabled on a partition Shiyang Ruan
2022-06-10  5:46 ` Christoph Hellwig
2022-07-01  0:31 ` Darrick J. Wong
2022-07-01  5:14   ` Shiyang Ruan
2022-07-21 12:43     ` ruansy.fnst
2022-07-21 14:06   ` ruansy.fnst
2022-07-21 16:16     ` Darrick J. Wong
2022-07-29  3:55       ` ruansy.fnst
2022-07-29  4:54         ` Darrick J. Wong
2022-08-03  6:47           ` ruansy.fnst
2022-08-04  0:51             ` Darrick J. Wong
2022-08-04  1:36               ` Shiyang Ruan
2022-09-08 13:46               ` Shiyang Ruan
2022-09-09 13:01                 ` Brian Foster
2022-09-14  6:44                   ` Yang, Xiao/杨 晓
2022-09-14  9:38                     ` Yang, Xiao/杨 晓
2022-09-14 12:34                       ` Brian Foster
2022-09-14 16:28                         ` Darrick J. Wong
2022-09-15 10:14                           ` Yang, Xiao/杨 晓
2022-09-16  2:04                             ` Yang, Xiao/杨 晓
2022-09-20  2:38                               ` Yang, Xiao/杨 晓
2022-09-30  0:56                                 ` Gotou, Yasunori/五島 康文
2022-10-04  0:12                                   ` Darrick J. Wong
2022-10-04  4:12                                     ` Gotou, Yasunori/五島 康文
2022-10-04 18:26                                       ` Darrick J. Wong
2022-10-20 14:17                                         ` Yang, Xiao/杨 晓
2022-10-22  2:11                                           ` Darrick J. Wong
     [not found]                                             ` <09f522cd-e846-12ee-d662-14f34a2977c4@fujitsu.com>
2022-10-23  7:04                                               ` yangx.jy
2022-10-23 22:00                                             ` Dave Chinner
2022-10-24  3:17                                               ` ruansy.fnst
2022-10-24  4:05                                                 ` Darrick J. Wong
2022-10-24  5:31                                                 ` Dave Chinner
2022-10-25 14:26                                                   ` ruansy.fnst
2022-10-25 17:56                                                     ` Darrick J. Wong
2022-10-27 21:08                                                       ` Darrick J. Wong
2022-10-28  1:37                                                         ` Dan Williams
2022-10-30  9:31                                                           ` Shiyang Ruan
2022-11-02  0:45                                                             ` Darrick J. Wong
2022-11-02  5:17                                                               ` ruansy.fnst
2022-11-03  2:32                                                                 ` Dave Chinner
2022-10-24 17:12                                               ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).