Re: [PATCH] ext2fs: avoid re-reading inode multiple times

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 07, 2021 at 01:50:23AM -0600, Andreas Dilger wrote:
> 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@xxxxxxxxx>

Applied, although I needed to add this initialization patch to avoid a
"make check" failure.

diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
index 157e6eac..d36fe68d 100644
--- a/lib/ext2fs/ext_attr.c
+++ b/lib/ext2fs/ext_attr.c
@@ -998,7 +998,7 @@ errcode_t ext2fs_xattrs_read_inode(struct ext2_xattr_handle *handle,
 	char *start, *block_buf = NULL;
 	blk64_t blk;
 	size_t i;
-	errcode_t err;
+	errcode_t err = 0;
 
 	EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
 
						- Ted



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux