All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Pace <Aaron.Pace@alcatel-lucent.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ext2fs: Fix optimization bug for doubly-indirect block pointers
Date: Mon, 26 Jul 2010 13:58:20 -0600	[thread overview]
Message-ID: <4C4DE8DC.4020500@alcatel-lucent.com> (raw)

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.

Signed-off-by: Aaron Pace <Aaron.Pace@alcatel-lucent.com>
---
 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 4b391d6..a88cf87 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);
-- 
1.5.4.3

             reply	other threads:[~2010-07-26 19:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26 19:58 Aaron Pace [this message]
     [not found] ` <4C4DEEC7.7010105@alcatel-lucent.com>
2010-07-26 20:24   ` [U-Boot] [PATCH] ext2fs: Fix optimization bug for doubly-indirect block pointers Aaron Pace
2010-08-07 21:02     ` Wolfgang Denk
2010-08-08 23:01 ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C4DE8DC.4020500@alcatel-lucent.com \
    --to=aaron.pace@alcatel-lucent.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.