diff options
author | Aaron Pace <Aaron.Pace@alcatel-lucent.com> | 2010-07-26 14:24:44 -0600 |
---|---|---|
committer | Michael BRANDT <michael.brandt@stericsson.com> | 2010-08-23 16:27:51 +0200 |
commit | a5041c72abedb8463f19b4667b4aa1595e3edb8e (patch) | |
tree | 6a16c0fa4e19f3d45e8a8a677687874fa4c7efed | |
parent | a065ee95afbb9868dbb0c900d516ea45a8e0edff (diff) |
ext2fs: Fix optimization bug for doubly-indirect block pointers
Doubly-indirect block numbers are compared against the first-level
indirect block when checking for a cached copy. This is causing the
doubly-indirect block to be re-read each time it is accessed.
Repairing this reduces load time for a 70M file from 72 seconds
to 38 seconds.
Change-Id: I497e1f063f0d596d95171e42d1c39dc2c6aedf38
Signed-off-by: Aaron Pace <Aaron.Pace@alcatel-lucent.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/3975
Tested-by: Michael BRANDT <michael.brandt@stericsson.com>
Reviewed-by: Sebastian RASMUSSEN <sebastian.rasmussen@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com>
-rw-r--r-- | fs/ext2/ext2fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c index 4b391d60a..a88cf8704 100644 --- a/fs/ext2/ext2fs.c +++ b/fs/ext2/ext2fs.c @@ -364,7 +364,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); |