[PATCH 2/4] qi-fix-ext2-inefficiency-bug.patch

Andy Green andy at openmoko.com
Sun Oct 26 06:27:31 CET 2008


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 <andy at openmoko.com>
---

 src/fs/ext2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/fs/ext2.c b/src/fs/ext2.c
index e09ca4a..acb979f 100644
--- a/src/fs/ext2.c
+++ b/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);




More information about the openmoko-kernel mailing list