[PATCH 16/19] mkfs: move spinodes crc check

Jan Tulak jtulak at redhat.com
Thu Apr 21 04:39:50 CDT 2016


Spinodes crc check is now moved to be in the same way as finobt.

Signed-off-by: Jan Tulak <jtulak at redhat.com>
Reviewed-by: Brian Foster <bfoster at redhat.com>
---
 mkfs/xfs_mkfs.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index be82ec5..a6334bc 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2389,19 +2389,20 @@ _("32 bit Project IDs always enabled on CRC enabled filesytems\n"));
 		 * explicitly turned them off then silently turn them off
 		 * to avoid an unnecessary warning. If the user explicitly
 		 * tried to use crc=0,finobt=1, then issue a warning before
-		 * turning them off.
+		 * turning them off. The same is also for sparse inodes.
 		 */
 		if (sb_feat.finobt && mopts.subopt_params[M_FINOBT].seen) {
 			fprintf(stderr,
 _("warning: finobt not supported without CRC support, disabled.\n"));
 		}
 		sb_feat.finobt = 0;
-	}
 
-	if (sb_feat.spinodes && !sb_feat.crcs_enabled) {
-		fprintf(stderr,
-_("warning: sparse inodes not supported without CRC support, disabled.\n"));
+		if (sb_feat.spinodes) {
+			fprintf(stderr,
+	_("warning: sparse inodes not supported without CRC support, disabled.\n"));
+		}
 		sb_feat.spinodes = 0;
+
 	}
 
 	if (nsflag || nlflag) {
-- 
2.5.0



More information about the xfs mailing list