From 2930dad2b20fe4b04ee3e9f5c7a76d8bf63342b0 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 17 Apr 2008 23:31:44 -0400 Subject: [PATCH] Rename the feature uninit_groups to uninit_bg Allow the old name of uninit_groups when converting feature names for backwards compatibility for scripts running mke2fs and tune2fs. Signed-off-by: "Theodore Ts'o" --- e2fsck/unix.c | 4 +--- lib/e2p/feature.c | 2 ++ misc/mke2fs.8.in | 2 +- misc/tune2fs.8.in | 6 +++--- resize/main.c | 2 +- tests/f_uninit_last_uninit/script | 2 +- tests/m_uninit/expect.1 | 4 ++-- tests/m_uninit/script | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/e2fsck/unix.c b/e2fsck/unix.c index f5ece71..4ab0802 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -559,9 +559,7 @@ static void parse_extended_opts(e2fsck_t ctx, const char *opts) "and may take an argument which\n" "is set off by an equals ('=') sign. " "Valid extended options are:\n" - "\tea_ver=\n" - "\tuninit_groups\n" - "\tinit_groups\n\n"), stderr); + "\tea_ver=\n\n"), stderr); exit(1); } } diff --git a/lib/e2p/feature.c b/lib/e2p/feature.c index cf37447..b3a2b4d 100644 --- a/lib/e2p/feature.c +++ b/lib/e2p/feature.c @@ -45,6 +45,8 @@ static struct feature feature_list[] = { { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_HUGE_FILE, "huge_file" }, { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_GDT_CSUM, + "uninit_bg" }, + { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_GDT_CSUM, "uninit_groups" }, { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_DIR_NLINK, "dir_nlink" }, diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in index 4f60bb2..e12b42e 100644 --- a/misc/mke2fs.8.in +++ b/misc/mke2fs.8.in @@ -449,7 +449,7 @@ option). @JDEV@must be created with the same @JDEV@block size as the filesystems that will be using it. .TP -.B uninit_groups +.B uninit_bg Create a filesystem without initializing all of the groups. This speeds up filesystem creation time noticably, and can also reduce .BR e2fsck time diff --git a/misc/tune2fs.8.in b/misc/tune2fs.8.in index 66d9d52..9f8f23a 100644 --- a/misc/tune2fs.8.in +++ b/misc/tune2fs.8.in @@ -440,7 +440,7 @@ future. .B Tune2fs only supports clearing this filesystem feature. .TP -.B uninit_groups +.B uninit_bg Allow the kernel to initialize bitmaps and inode tables and keep a high watermark for the unused inodes in a filesystem, to reduce .BR e2fsck (8) @@ -451,7 +451,7 @@ original time, depending on how full the file system is. .IP After setting or clearing .BR sparse_super , -.BR uninit_groups , +.BR uninit_bg , .BR filetype , or .B resize_inode @@ -468,7 +468,7 @@ feature, can be run to convert existing directories to the hashed B-tree format. Enabling certain filesystem features may prevent the filesystem from being mounted by kernels which do not support those features. In particular the -.BR uninit_groups +.BR uninit_bg and .BR flex_bg features are only supported by the ext4 filesystem. diff --git a/resize/main.c b/resize/main.c index 2e5c89c..8b90e96 100644 --- a/resize/main.c +++ b/resize/main.c @@ -309,7 +309,7 @@ int main (int argc, char ** argv) if (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) { com_err(program_name, EXT2_ET_RO_UNSUPP_FEATURE, - ":- uninit_groups"); + ":- uninit_bg"); exit(1); } diff --git a/tests/f_uninit_last_uninit/script b/tests/f_uninit_last_uninit/script index 477357a..8700329 100644 --- a/tests/f_uninit_last_uninit/script +++ b/tests/f_uninit_last_uninit/script @@ -1,7 +1,7 @@ SKIP_GUNZIP="true" touch $TMPFILE -$MKE2FS -N 32 -F -o Linux -O uninit_groups -b 1024 $TMPFILE 10000 > /dev/null 2>&1 +$MKE2FS -N 32 -F -o Linux -O uninit_bg -b 1024 $TMPFILE 10000 > /dev/null 2>&1 $DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1 set_current_time 200704102100 set_super_value lastcheck 0 diff --git a/tests/m_uninit/expect.1 b/tests/m_uninit/expect.1 index 93cea7b..26dc244 100644 --- a/tests/m_uninit/expect.1 +++ b/tests/m_uninit/expect.1 @@ -15,7 +15,7 @@ Superblock backups stored on blocks: Writing inode tables: done Writing superblocks and filesystem accounting information: done -Filesystem features: ext_attr resize_inode dir_index filetype sparse_super uninit_groups +Filesystem features: ext_attr resize_inode dir_index filetype sparse_super uninit_bg Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure @@ -29,7 +29,7 @@ Filesystem volume name: Last mounted on: Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) -Filesystem features: ext_attr resize_inode dir_index filetype sparse_super uninit_groups +Filesystem features: ext_attr resize_inode dir_index filetype sparse_super uninit_bg Default mount options: (none) Filesystem state: clean Errors behavior: Continue diff --git a/tests/m_uninit/script b/tests/m_uninit/script index 0de2699..0b565ac 100644 --- a/tests/m_uninit/script +++ b/tests/m_uninit/script @@ -1,4 +1,4 @@ DESCRIPTION="uninitialized group feature" FS_SIZE=131072 -MKE2FS_OPTS="-O uninit_groups" +MKE2FS_OPTS="-O uninit_bg" . $cmd_dir/run_mke2fs -- 1.8.3.1