From 39fc2afbf4250e7bfa0ea16e3dc684f43c24d197 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 28 Nov 2008 10:16:41 +0000 Subject: [PATCH] qi-fix-ext2-inefficiency-bug.patch Naughty bug bug U-Boot ext2 implementation -- cut and paste of stanza above for indir1 check used for indir2 but not all the check was not updated. This removes hundreds of repeated reads of same sector during kernel load. Signed-off-by: Andy Green --- qiboot/src/fs/ext2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qiboot/src/fs/ext2.c b/qiboot/src/fs/ext2.c index e09ca4a..acb979f 100644 --- a/qiboot/src/fs/ext2.c +++ b/qiboot/src/fs/ext2.c @@ -362,7 +362,7 @@ static int ext2fs_read_block(ext2fs_node_t node, int fileblock) { indir2_size = blksz; } if ((__le32_to_cpu(indir1_block[rblock / perblock]) << - log2_blksz) != indir1_blkno) { + log2_blksz) != indir2_blkno) { status = ext2fs_devread(__le32_to_cpu(indir1_block[rblock / perblock]), log2_blksz, 0, blksz, (char *) indir2_block);