Whamcloud - gitweb
Teach ext2fs_open2() to honor the EXT2_FLAG_SUPER_ONLY flag
authorTheodore Ts'o <tytso@mit.edu>
Tue, 22 Oct 2019 22:42:25 +0000 (18:42 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 22 Oct 2019 22:55:06 +0000 (18:55 -0400)
commite6069a05daeb8d18289ad7772d7800b09b418bca
treebe0b6030c0c23508d048d4b44379575f0a6e1edc
parent4b4f7b359774453ed88a7d111e73a4f2586e5c28
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
lib/ext2fs/blknum.c
lib/ext2fs/openfs.c
misc/dumpe2fs.c
misc/tune2fs.c