Whamcloud - gitweb
mke2fs: only print the low-level file system stats in verbose mode
authorTheodore Ts'o <tytso@mit.edu>
Sat, 26 Apr 2014 23:00:50 +0000 (19:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 5 May 2014 03:15:29 +0000 (23:15 -0400)
Also print the file system UUID if it is non-NULL.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 files changed:
misc/mke2fs.c
tests/f_resize_inode/expect
tests/m_dasd_bs/expect.1
tests/m_desc_size_128/expect.1
tests/m_extent_journal/expect.1
tests/m_large_file/expect.1
tests/m_meta_bg/expect.1
tests/m_mmp/expect.1
tests/m_no_opt/expect.1
tests/m_quota/expect.1
tests/m_raid_opt/expect.1
tests/m_root_owner/expect.1
tests/m_std/expect.1
tests/m_uninit/expect.1

index 97b601f..2c51999 100644 (file)
@@ -618,6 +618,14 @@ static void show_stats(ext2_filsys fs)
        dgrp_t                  i;
        int                     need, col_left;
 
+       if (!verbose) {
+               printf(_("Creating filesystem with %llu %dk blocks and "
+                        "%u inodes\n"),
+                      ext2fs_blocks_count(s), fs->blocksize >> 10,
+                      s->s_inodes_count);
+               goto skip_details;
+       }
+
        if (ext2fs_blocks_count(&fs_param) != ext2fs_blocks_count(s))
                fprintf(stderr, _("warning: %llu blocks unused.\n\n"),
                       ext2fs_blocks_count(&fs_param) - ext2fs_blocks_count(s));
@@ -666,11 +674,14 @@ static void show_stats(ext2_filsys fs)
                       s->s_blocks_per_group, s->s_clusters_per_group);
        printf(_("%u inodes per group\n"), s->s_inodes_per_group);
 
+skip_details:
        if (fs->group_desc_count == 1) {
                printf("\n");
                return;
        }
 
+       if (!e2p_is_null_uuid(s->s_uuid))
+               printf(_("Filesystem UUID: %s\n"), e2p_uuid2str(s->s_uuid));
        printf("%s", _("Superblock backups stored on blocks: "));
        group_block = s->s_first_data_block;
        col_left = 0;
index 3fffe44..db57ed6 100644 (file)
@@ -1,16 +1,5 @@
 mke2fs -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384
-Filesystem label=
-OS type: Linux
-Block size=1024 (log=0)
-Fragment size=1024 (log=0)
-Stride=0 blocks, Stripe width=0 blocks
-4096 inodes, 16384 blocks
-819 blocks (5.00%) reserved for the super user
-First data block=1
-Maximum filesystem blocks=8421376
-16 block groups
-1024 blocks per group, 1024 fragments per group
-256 inodes per group
+Creating filesystem with 16384 1k blocks and 4096 inodes
 Superblock backups stored on blocks: 
        1025, 3073, 5121, 7169, 9217
 
index 0cbe339..75a401d 100644 (file)
@@ -1,15 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=2048 (log=1)
-Fragment size=2048 (log=1)
-Stride=0 blocks, Stripe width=0 blocks
-16384 inodes, 32768 blocks
-1638 blocks (5.00%) reserved for the super user
-First data block=0
-Maximum filesystem blocks=33554432
-2 block groups
-16384 blocks per group, 16384 fragments per group
-8192 inodes per group
+Creating filesystem with 32768 2k blocks and 16384 inodes
 Superblock backups stored on blocks: 
        16384
 
index 8f01591..5a7da87 100644 (file)
@@ -1,15 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=1024 (log=0)
-Fragment size=1024 (log=0)
-Stride=0 blocks, Stripe width=0 blocks
-8192 inodes, 131072 blocks
-6553 blocks (5.00%) reserved for the super user
-First data block=1
-Maximum filesystem blocks=2228224
-128 block groups
-1024 blocks per group, 1024 fragments per group
-64 inodes per group
+Creating filesystem with 131072 1k blocks and 8192 inodes
 Superblock backups stored on blocks: 
        1025, 3073, 5121, 7169, 9217, 25601, 27649, 50177, 82945, 128001
 
index d5d7a24..34e8a80 100644 (file)
@@ -1,15 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=1024 (log=0)
-Fragment size=1024 (log=0)
-Stride=0 blocks, Stripe width=0 blocks
-16384 inodes, 65536 blocks
-3276 blocks (5.00%) reserved for the super user
-First data block=1
-Maximum filesystem blocks=67108864
-8 block groups
-8192 blocks per group, 8192 fragments per group
-2048 inodes per group
+Creating filesystem with 65536 1k blocks and 16384 inodes
 Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345
 
index ced9431..8ab2711 100644 (file)
@@ -1,15 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=4096 (log=2)
-Fragment size=4096 (log=2)
-Stride=0 blocks, Stripe width=0 blocks
-64 inodes, 16384 blocks
-819 blocks (5.00%) reserved for the super user
-First data block=0
-Maximum filesystem blocks=16777216
-1 block group
-32768 blocks per group, 32768 fragments per group
-64 inodes per group
+Creating filesystem with 16384 4k blocks and 64 inodes
 
 Allocating group tables:    \b\b\bdone                            
 Writing inode tables:    \b\b\bdone                            
index ec10d6e..7df4230 100644 (file)
@@ -1,14 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=1024 (log=0)
-Fragment size=1024 (log=0)
-Stride=0 blocks, Stripe width=0 blocks
-32768 inodes, 131072 blocks
-6553 blocks (5.00%) reserved for the super user
-First data block=1
-128 block groups
-1024 blocks per group, 1024 fragments per group
-256 inodes per group
+Creating filesystem with 131072 1k blocks and 32768 inodes
 Superblock backups stored on blocks: 
        1025, 3073, 5121, 7169, 9217, 25601, 27649, 50177, 82945, 128001
 
index e18aa77..aec0a84 100644 (file)
@@ -1,15 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=4096 (log=2)
-Fragment size=4096 (log=2)
-Stride=0 blocks, Stripe width=0 blocks
-65536 inodes, 65536 blocks
-3276 blocks (5.00%) reserved for the super user
-First data block=0
-Maximum filesystem blocks=67108864
-2 block groups
-32768 blocks per group, 32768 fragments per group
-32768 inodes per group
+Creating filesystem with 65536 4k blocks and 65536 inodes
 Superblock backups stored on blocks: 
        32768
 
index e7bf2db..58b311c 100644 (file)
@@ -1,14 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=1024 (log=0)
-Fragment size=1024 (log=0)
-Stride=0 blocks, Stripe width=0 blocks
-16384 inodes, 65536 blocks
-3276 blocks (5.00%) reserved for the super user
-First data block=1
-8 block groups
-8192 blocks per group, 8192 fragments per group
-2048 inodes per group
+Creating filesystem with 65536 1k blocks and 16384 inodes
 Superblock backups stored on blocks: 
        8193, 16385, 24577, 32769, 40961, 49153, 57345
 
index 830046e..a0f6501 100644 (file)
@@ -2,18 +2,7 @@
 Warning: the quota feature is still under development
 See https://ext4.wiki.kernel.org/index.php/Quota for more information
 
-Filesystem label=
-OS type: Linux
-Block size=1024 (log=0)
-Fragment size=1024 (log=0)
-Stride=0 blocks, Stripe width=0 blocks
-32768 inodes, 131072 blocks
-6553 blocks (5.00%) reserved for the super user
-First data block=1
-Maximum filesystem blocks=67371008
-16 block groups
-8192 blocks per group, 8192 fragments per group
-2048 inodes per group
+Creating filesystem with 131072 1k blocks and 32768 inodes
 Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345, 73729
 
index 9548665..0fccb7c 100644 (file)
@@ -1,15 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=1024 (log=0)
-Fragment size=1024 (log=0)
-Stride=13 blocks, Stripe width=0 blocks
-32768 inodes, 131072 blocks
-6553 blocks (5.00%) reserved for the super user
-First data block=1
-Maximum filesystem blocks=8519680
-128 block groups
-1024 blocks per group, 1024 fragments per group
-256 inodes per group
+Creating filesystem with 131072 1k blocks and 32768 inodes
 Superblock backups stored on blocks: 
        1025, 3073, 5121, 7169, 9217, 25601, 27649, 50177, 82945, 128001
 
index 72b0e08..cd94993 100644 (file)
@@ -1,16 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=1024 (log=0)
-Fragment size=1024 (log=0)
-Stride=0 blocks, Stripe width=0 blocks
-128 inodes, 1024 blocks
-51 blocks (4.98%) reserved for the super user
-First data block=1
-Root directory owner=1234:1234
-Maximum filesystem blocks=1048576
-1 block group
-8192 blocks per group, 8192 fragments per group
-128 inodes per group
+Creating filesystem with 1024 1k blocks and 128 inodes
 
 Allocating group tables:    \b\b\bdone                            
 Writing inode tables:    \b\b\bdone                            
index f356531..b05031f 100644 (file)
@@ -1,15 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=1024 (log=0)
-Fragment size=1024 (log=0)
-Stride=0 blocks, Stripe width=0 blocks
-16384 inodes, 65536 blocks
-3276 blocks (5.00%) reserved for the super user
-First data block=1
-Maximum filesystem blocks=67108864
-8 block groups
-8192 blocks per group, 8192 fragments per group
-2048 inodes per group
+Creating filesystem with 65536 1k blocks and 16384 inodes
 Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345
 
index 4af5955..e886dfb 100644 (file)
@@ -1,15 +1,4 @@
-Filesystem label=
-OS type: Linux
-Block size=1024 (log=0)
-Fragment size=1024 (log=0)
-Stride=0 blocks, Stripe width=0 blocks
-32768 inodes, 131072 blocks
-6553 blocks (5.00%) reserved for the super user
-First data block=1
-Maximum filesystem blocks=67371008
-16 block groups
-8192 blocks per group, 8192 fragments per group
-2048 inodes per group
+Creating filesystem with 131072 1k blocks and 32768 inodes
 Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345, 73729