Whamcloud - gitweb
ext2fs: avoid re-reading inode multiple times
authorAndreas Dilger <adilger@dilger.ca>
Wed, 7 Apr 2021 07:50:23 +0000 (01:50 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 28 Oct 2021 14:45:46 +0000 (10:45 -0400)
commit02827d06bcf0d838c26d92f8f5ae7579de161110
treebafa882c88e392400124f45f45fc048fa182fdf9
parentbd2e72c5c5521b561d20a881c843a64a5832721a
ext2fs: avoid re-reading inode multiple times

Reduce the number of times that the inode is read from storage.
Factor ext2fs_xattrs_read() into a new ext2fs_xattrs_read_inode()
function that can accept an in-memory inode, and call that from
within ext2fs_xattrs_read() and in e2fsck_pass1() when the inode
is already available.

Similarly, in e2fsck_pass4() avoid re-reading the inode multiple
times in disconnect_inode(), check_ea_inode(), and in the main
function body if possible.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass1.c
e2fsck/pass4.c
lib/ext2fs/ext2fs.h
lib/ext2fs/ext_attr.c