lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun,  6 Jan 2013 20:25:17 +0800
From:	Zheng Liu <gnehzuil.liu@...il.com>
To:	linux-ext4@...r.kernel.org
Cc:	Zheng Liu <wenqing.lz@...bao.com>
Subject: [PATCH] mke2fs: check extents feature when bigalloc feature is enabled

From: Zheng Liu <wenqing.lz@...bao.com>

When bigalloc feature is enabled in mkfs, extents feature also needs to be
enabled.  But now when bigalloc feature is enabled without extents feature,
users will not get any warning messages until they try to mount this file
system.

Signed-off-by: Zheng Liu <wenqing.lz@...bao.com>
---
 misc/mke2fs.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index a288147..713eb21 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1988,6 +1988,15 @@ profile_error:
 		fs_param.s_feature_ro_compat &=
 				~EXT4_FEATURE_RO_COMPAT_GDT_CSUM;
 
+	/* Can't support bigalloc feature without extents feature */
+	if ((fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC) &&
+	    !(fs_param.s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS)) {
+		com_err(program_name, 0,
+			_("Can't support bigalloc feature without "
+			  "extents feature"));
+		exit(1);
+	}
+
 	/* Since sparse_super is the default, we would only have a problem
 	 * here if it was explicitly disabled.
 	 */
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ