Blame SOURCES/xfsprogs-4.17.0-reflink-default.patch

5a2326
Index: xfsprogs-4.19.0/mkfs/xfs_mkfs.c
5a2326
===================================================================
5a2326
--- xfsprogs-4.19.0.orig/mkfs/xfs_mkfs.c
5a2326
+++ xfsprogs-4.19.0/mkfs/xfs_mkfs.c
5a2326
@@ -1973,15 +1973,15 @@ _("Directory ftype field always enabled 
5a2326
 			usage();
5a2326
 		}
5a2326
 
5a2326
-	} else {
5a2326
+	} else {	/* !crcs_enabled */
5a2326
 		/*
5a2326
-		 * The kernel doesn't currently support crc=0,finobt=1
5a2326
-		 * filesystems. If crcs are not enabled and the user has not
5a2326
-		 * explicitly turned finobt on, then silently turn it off to
5a2326
-		 * avoid an unnecessary warning.
5a2326
+		 * The kernel doesn't support crc=0,finobt=1 filesystems.
5a2326
+		 * If crcs are not enabled and the user has not explicitly
5a2326
+		 * turned finobt on, then silently turn it off to avoid an
5a2326
+		 * unnecessary warning.
5a2326
 		 * If the user explicitly tried to use crc=0,finobt=1,
5a2326
 		 * then issue an error.
5a2326
-		 * The same is also for sparse inodes.
5a2326
+		 * The same is also true for sparse inodes and reflink.
5a2326
 		 */
5a2326
 		if (cli->sb_feat.finobt && cli_opt_set(&mopts, M_FINOBT)) {
5a2326
 			fprintf(stderr,
5a2326
@@ -2004,7 +2004,7 @@ _("rmapbt not supported without CRC supp
5a2326
 		}
5a2326
 		cli->sb_feat.rmapbt = false;
5a2326
 
5a2326
-		if (cli->sb_feat.reflink) {
5a2326
+		if (cli->sb_feat.reflink && cli_opt_set(&mopts, M_REFLINK)) {
5a2326
 			fprintf(stderr,
5a2326
 _("reflink not supported without CRC support\n"));
5a2326
 			usage();
5a2326
@@ -3788,7 +3788,7 @@ main(
5a2326
 			.finobt = true,
5a2326
 			.spinodes = true,
5a2326
 			.rmapbt = false,
5a2326
-			.reflink = false,
5a2326
+			.reflink = true,
5a2326
 			.parent_pointers = false,
5a2326
 			.nodalign = false,
5a2326
 			.nortalign = false,
5a2326
Index: xfsprogs-4.19.0/man/man8/mkfs.xfs.8
5a2326
===================================================================
5a2326
--- xfsprogs-4.19.0.orig/man/man8/mkfs.xfs.8
5a2326
+++ xfsprogs-4.19.0/man/man8/mkfs.xfs.8
5a2326
@@ -229,9 +229,9 @@ mapping will be changed to the new block
5a2326
 enables the creation of per-file snapshots and deduplication.  It is only
5a2326
 available for the data forks of regular files.
5a2326
 .IP
5a2326
-By default,
5a2326
+By default in Red Hat Enterprise Linux 8,
5a2326
 .B mkfs.xfs
5a2326
-will not create reference count btrees and therefore will not enable the
5a2326
+will create reference count btrees and therefore will enable the
5a2326
 reflink feature.  This feature is only available for filesystems created with
5a2326
 the (default)
5a2326
 .B \-m crc=1
5a2326
@@ -239,6 +239,13 @@ option set. When the option
5a2326
 .B \-m crc=0
5a2326
 is used, the reference count btree feature is not supported and reflink is
5a2326
 disabled.
5a2326
+.IP
5a2326
+Note: the filesystem DAX mount option (
5a2326
+.B \-o dax
5a2326
+) is incompatible with
5a2326
+reflink-enabled XFS filesystems.  To use filesystem DAX with XFS, specify the
5a2326
+.B \-m reflink=0
5a2326
+option to mkfs.xfs to disable the reflink feature.
5a2326
 .RE
5a2326
 .TP
5a2326
 .BI \-d " data_section_options"