summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/dumpe2fs.c44
-rw-r--r--misc/e2freefrag.8.in2
-rw-r--r--misc/mke2fs.8.in59
-rw-r--r--misc/mke2fs.conf4
-rw-r--r--misc/tune2fs.8.in23
5 files changed, 95 insertions, 37 deletions
diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index b966b4d5..6e09f9d9 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -286,10 +286,14 @@ static void list_bad_blocks(ext2_filsys fs, int dump)
static void print_inline_journal_information(ext2_filsys fs)
{
+ journal_superblock_t *jsb;
struct ext2_inode inode;
+ ext2_file_t journal_file;
errcode_t retval;
ino_t ino = fs->super->s_journal_inum;
- int size;
+ char buf[1024];
+ __u32 *mask_ptr, mask, m;
+ int i, j, size, printed = 0;
retval = ext2fs_read_inode(fs, ino, &inode);
if (retval) {
@@ -297,6 +301,38 @@ static void print_inline_journal_information(ext2_filsys fs)
_("while reading journal inode"));
exit(1);
}
+ retval = ext2fs_file_open2(fs, ino, &inode, 0, &journal_file);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while opening journal inode"));
+ exit(1);
+ }
+ retval = ext2fs_file_read(journal_file, buf, sizeof(buf), 0);
+ if (retval) {
+ com_err(program_name, retval,
+ _("while reading journal super block"));
+ exit(1);
+ }
+ ext2fs_file_close(journal_file);
+ jsb = (journal_superblock_t *) buf;
+ if (be32_to_cpu(jsb->s_header.h_magic) != JFS_MAGIC_NUMBER) {
+ fprintf(stderr,
+ "Journal superblock magic number invalid!\n");
+ exit(1);
+ }
+ printf(_("Journal features: "));
+ for (i=0, mask_ptr=&jsb->s_feature_compat; i <3; i++,mask_ptr++) {
+ mask = be32_to_cpu(*mask_ptr);
+ for (j=0,m=1; j < 32; j++, m<<=1) {
+ if (mask & m) {
+ printf(" %s", e2p_jrnl_feature2string(i, m));
+ printed++;
+ }
+ }
+ }
+ if (printed == 0)
+ printf(" (none)");
+ printf("\n");
fputs(_("Journal size: "), stdout);
if ((fs->super->s_feature_ro_compat &
EXT4_FEATURE_RO_COMPAT_HUGE_FILE) &&
@@ -308,6 +344,12 @@ static void print_inline_journal_information(ext2_filsys fs)
printf("%uk\n", size);
else
printf("%uM\n", size >> 10);
+ printf(_("Journal length: %u\n"
+ "Journal sequence: 0x%08x\n"
+ "Journal start: %u\n"),
+ (unsigned int)ntohl(jsb->s_maxlen),
+ (unsigned int)ntohl(jsb->s_sequence),
+ (unsigned int)ntohl(jsb->s_start));
}
static void print_journal_information(ext2_filsys fs)
diff --git a/misc/e2freefrag.8.in b/misc/e2freefrag.8.in
index 56fdbff7..564be741 100644
--- a/misc/e2freefrag.8.in
+++ b/misc/e2freefrag.8.in
@@ -1,5 +1,5 @@
.\" -*- nroff -*-
-.TH E2FREEFRAG 8
+.TH E2FREEFRAG 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
.SH NAME
e2freefrag \- report free space fragmentation information
.SH SYNOPSIS
diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in
index 1575b089..b02905ba 100644
--- a/misc/mke2fs.8.in
+++ b/misc/mke2fs.8.in
@@ -267,10 +267,12 @@ are developing test cases.
.TP
.BI \-G " number-of-groups"
Specify the number of block groups that will be packed together to
-create one large virtual block group on an ext4 filesystem. This
-improves meta-data locality and performance on meta-data heavy
-workloads. The number of groups must be a power of 2 and may only be
-specified if the flex_bg filesystem feature is enabled.
+create a larger virtual block group (or "flex_bg group") in an
+ext4 filesystem. This improves meta-data locality and performance
+on meta-data heavy workloads. The number of groups must be a power
+of 2 and may only be specified if the
+.B flex_bg
+filesystem feature is enabled.
.TP
.BI \-i " bytes-per-inode"
Specify the bytes/inode ratio.
@@ -468,20 +470,27 @@ prefix the feature name with a caret ('^') character. The
pseudo-filesystem feature "none" will clear all filesystem features.
.RS 1.2i
.TP
-.B large_file
-Filesystem can contain files that are greater than 2GB. (Modern kernels
-set this feature automatically when a file > 2GB is created.)
-.TP
.B dir_index
Use hashed b-trees to speed up lookups in large directories.
.TP
+.B extent
+Instead of using the indirect block scheme for storing the location of
+data blocks in an inode, use extents instead. This is a much more
+efficient encoding which speeds up filesystem access, especially for
+large files.
+.TP
.B filetype
Store file type information in directory entries.
.TP
.B flex_bg
-Allow bitmaps and inode tables for a block group to be placed anywhere
-on the storage media (use with \-G option to group meta-data in order
-to create a large virtual block group).
+Allow the per-block group metadata (allocation bitmaps and inode tables)
+to be placed anywhere on the storage media. In addition,
+.B mke2fs
+will place the per-block group metadata together starting at the first
+block group of each "flex_bg group". The size of the flex_bg group
+can be specified using the
+.B \-G
+option.
.TP
.B has_journal
Create an ext3 journal (as if using the
@@ -496,21 +505,9 @@ option).
@JDEV@must be created with the same
@JDEV@block size as the filesystems that will be using it.
.TP
-.B extent
-Instead of using the indirect block scheme for storing the location of
-data blocks in an inode, use extents instead. This is a much more
-efficient encoding which speeds up filesystem access, especially for
-large files.
-.TP
-.B uninit_bg
-Create a filesystem without initializing all of the block groups. This
-feature also enables checksums and highest-inode-used statistics in each
-blockgroup. This feature can
-speed up filesystem creation time noticeably (if lazy_itable_init is
-enabled), and can also reduce
-.BR e2fsck
-time dramatically. It is only supported by the ext4 filesystem in
-recent Linux kernels.
+.B large_file
+Filesystem can contain files that are greater than 2GB. (Modern kernels
+set this feature automatically when a file > 2GB is created.)
.TP
.B resize_inode
Reserve space so the block group descriptor table may grow in the future.
@@ -527,6 +524,16 @@ extended option.
.B sparse_super
Create a filesystem with fewer superblock backup copies
(saves space on large filesystems).
+.TP
+.B uninit_bg
+Create a filesystem without initializing all of the block groups. This
+feature also enables checksums and highest-inode-used statistics in each
+blockgroup. This feature can
+speed up filesystem creation time noticeably (if lazy_itable_init is
+enabled), and can also reduce
+.BR e2fsck
+time dramatically. It is only supported by the ext4 filesystem in
+recent Linux kernels.
.RE
.TP
.B \-q
diff --git a/misc/mke2fs.conf b/misc/mke2fs.conf
index 3795b1ed..52fe58ed 100644
--- a/misc/mke2fs.conf
+++ b/misc/mke2fs.conf
@@ -9,11 +9,11 @@
features = has_journal
}
ext4 = {
- features = has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
inode_size = 256
}
ext4dev = {
- features = has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
inode_size = 256
options = test_fs=1
}
diff --git a/misc/tune2fs.8.in b/misc/tune2fs.8.in
index 4abc728b..cf0d8ac6 100644
--- a/misc/tune2fs.8.in
+++ b/misc/tune2fs.8.in
@@ -431,24 +431,30 @@ The following filesystem features can be set or cleared using
.BR tune2fs :
.RS 1.2i
.TP
-.B large_file
-Filesystem can contain files that are greater than 2GB. (Modern kernels
-set this feature automatically when a file > 2GB is created.)
-.TP
.B dir_index
Use hashed b-trees to speed up lookups in large directories.
.TP
.B filetype
Store file type information in directory entries.
.TP
+.B flex_bg
+Allow bitmaps and inode tables for a block group to be placed
+anywhere on the storage media. \fBTune2fs\fR will not reorganize
+the location of the inode tables and allocation bitmaps, as
+.BR mke2fs (8)
+will do when it creates a freshly formated file system with
+.B flex_bg
+enabled.
+.TP
.B has_journal
Use a journal to ensure filesystem consistency even across unclean shutdowns.
Setting the filesystem feature is equivalent to using the
.B \-j
option.
.TP
-.B sparse_super
-Limit the number of backup superblocks to save space on large filesystems.
+.B large_file
+Filesystem can contain files that are greater than 2GB. (Modern kernels
+set this feature automatically when a file > 2GB is created.)
.TP
.B resize_inode
Reserve space so the block group descriptor table may grow in the
@@ -456,6 +462,9 @@ future.
.B Tune2fs
only supports clearing this filesystem feature.
.TP
+.B sparse_super
+Limit the number of backup superblocks to save space on large filesystems.
+.TP
.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
@@ -483,7 +492,7 @@ feature,
.B e2fsck -D
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
+mounted by kernels which do not support those features. In particular, the
.BR uninit_bg
and
.BR flex_bg