summaryrefslogtreecommitdiff
path: root/misc/tune2fs.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2019-10-22 18:42:25 -0400
committerTheodore Ts'o <tytso@mit.edu>2019-10-22 18:55:06 -0400
commite6069a05daeb8d18289ad7772d7800b09b418bca (patch)
treebe0b6030c0c23508d048d4b44379575f0a6e1edc /misc/tune2fs.c
parent4b4f7b359774453ed88a7d111e73a4f2586e5c28 (diff)
downloade2fsprogs-e6069a05daeb8d18289ad7772d7800b09b418bca.tar.gz
Teach ext2fs_open2() to honor the EXT2_FLAG_SUPER_ONLY flag
Opening the file system with EXT2_FLAG_SUPER_ONLY will leave fs->group_desc to be NULL and modify "dumpe2fs -h" and tune2fs when it is emulating e2label to use this flag. This speeds up "dumpe2fs -h" and "e2label" when operating on very large file systems. To allow other libext2fs functions to work without too many surprises, ext2fs_group_desc() will read in the block group descriptors on demand. This allows "dumpe2fs -h" to be able to read the journal inode, for example. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cray-bug-id: LUS-5777
Diffstat (limited to 'misc/tune2fs.c')
-rw-r--r--misc/tune2fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 39fce4a9..77a45875 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1698,7 +1698,7 @@ static void parse_e2label_options(int argc, char ** argv)
argv[1]);
exit(1);
}
- open_flag = EXT2_FLAG_JOURNAL_DEV_OK;
+ open_flag = EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SUPER_ONLY;
if (argc == 3) {
open_flag |= EXT2_FLAG_RW;
L_flag = 1;