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)
committerLi Dongyang <dongyangli@ddn.com>
Wed, 27 May 2020 01:20:05 +0000 (11:20 +1000)
commit8b0210841a74d541a157fdbae520c6b36f24fb84
treeeb03d262d17c38740172578898c81c207950554f
parent29d22c467547f11f4db31331549ee4e304eeb220
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