aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-01-21 19:07:38 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-01-21 19:07:38 -0500
commita713a7fe5a929c0e1307e6bded8ac66805c7e748 (patch)
treedd6a04a90545325bab3dfe22d9fe745555ad2256
parentc64929d9c36b971567e2fc45458cc7157d860e7a (diff)
downloade2fsprogs-a713a7fe5a929c0e1307e6bded8ac66805c7e748.tar.gz
e2fsprogs-a713a7fe5a929c0e1307e6bded8ac66805c7e748.tar.xz
e2fsprogs-a713a7fe5a929c0e1307e6bded8ac66805c7e748.zip
mke2fs, tune2fs, resize2fs: add warning messages for bigalloc and quota
The bigalloc and quota features have some known issues, so issue warnings in case users try to use them. More information can be found here: https://ext4.wiki.kernel.org/index.php/Bigalloc https://ext4.wiki.kernel.org/index.php/Quota Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--misc/mke2fs.c12
-rw-r--r--misc/tune2fs.c4
-rw-r--r--resize/main.c14
3 files changed, 30 insertions, 0 deletions
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index ace9eae1..fe5ce7d7 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1942,6 +1942,18 @@ profile_error:
exit(1);
}
+ if (fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC)
+ fprintf(stderr, _("\nWarning: the bigalloc feature is still "
+ "under development\n"
+ "See https://ext4.wiki.kernel.org/"
+ "index.php/Bigalloc for more information\n\n"));
+
+ if (fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_QUOTA)
+ fprintf(stderr, _("\nWarning: the quota feature is still "
+ "under development\n"
+ "See https://ext4.wiki.kernel.org/"
+ "index.php/Quota for more information\n\n"));
+
/* Since sparse_super is the default, we would only have a problem
* here if it was explicitly disabled.
*/
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 2c8b9e89..849f3a0e 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -736,6 +736,10 @@ void handle_quota_options(ext2_filsys fs)
quota_release_context(&qctx);
if ((usrquota == QOPT_ENABLE) || (grpquota == QOPT_ENABLE)) {
+ fprintf(stderr, _("\nWarning: the quota feature is still "
+ "under development\n"
+ "See https://ext4.wiki.kernel.org/"
+ "index.php/Quota for more information\n\n"));
fs->super->s_feature_ro_compat |= EXT4_FEATURE_RO_COMPAT_QUOTA;
ext2fs_mark_super_dirty(fs);
} else if (!fs->super->s_usr_quota_inum &&
diff --git a/resize/main.c b/resize/main.c
index 711e3754..4cbfe69b 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -147,6 +147,18 @@ static void determine_fs_stride(ext2_filsys fs)
#endif
}
+static bigalloc_check(ext2_filsys fs, int force)
+{
+ if (!force && EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+ EXT4_FEATURE_RO_COMPAT_BIGALLOC)) {
+ fprintf(stderr, _("\nResizing bigalloc file systems has "
+ "not been fully tested. Proceed\n"
+ "at your own risk! Use the force option "
+ "if you want to go ahead anyway.\n\n"));
+ exit(1);
+ }
+}
+
int main (int argc, char ** argv)
{
errcode_t retval;
@@ -428,6 +440,7 @@ int main (int argc, char ** argv)
exit(0);
}
if (mount_flags & EXT2_MF_MOUNTED) {
+ bigalloc_check(fs, force);
retval = online_resize_fs(fs, mtpt, &new_size, flags);
} else {
if (!force && ((fs->super->s_lastcheck < fs->super->s_mtime) ||
@@ -438,6 +451,7 @@ int main (int argc, char ** argv)
device_name);
exit(1);
}
+ bigalloc_check(fs, force);
printf(_("Resizing the filesystem on "
"%s to %llu (%dk) blocks.\n"),
device_name, new_size, fs->blocksize / 1024);