public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ext2fs: Fix optimization bug for doubly-indirect block pointers
@ 2010-07-26 19:58 Aaron Pace
       [not found] ` <4C4DEEC7.7010105@alcatel-lucent.com>
  2010-08-08 23:01 ` Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Aaron Pace @ 2010-07-26 19:58 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ext2fs: Fix optimization bug for doubly-indirect block pointers
       [not found] ` <4C4DEEC7.7010105@alcatel-lucent.com>
@ 2010-07-26 20:24   ` Aaron Pace
  2010-08-07 21:02     ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Aaron Pace @ 2010-07-26 20:24 UTC (permalink / raw)
  To: u-boot

Apologies for the oversight, here's the non line-wrapped version.

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ext2fs: Fix optimization bug for doubly-indirect block pointers
  2010-07-26 20:24   ` Aaron Pace
@ 2010-08-07 21:02     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2010-08-07 21:02 UTC (permalink / raw)
  To: u-boot

Dear Aaron Pace,

In message <4C4DEF0C.3020102@alcatel-lucent.com> you wrote:
> Apologies for the oversight, here's the non line-wrapped version.

It is still white space corrupted - where the original code has TABs,
your file has all SPACEs only.

Please never try to cvopy & paste patches, this does not work. Use
git-send-email instead.

Also note that such comments as the line above do not belong into the
commit messgae - they belong into the comment section, i. e. below the
"---" line.

> 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>
> ---
^^^^^^^^^
Here is where comments may be added.

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

Applied manually.

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Unix is like a toll road on which you have to stop every 50  feet  to
pay another nickel. But hey! You only feel 5 cents poorer each time.
                 - Larry Wall in <1992Aug13.192357.15731@netlabs.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ext2fs: Fix optimization bug for doubly-indirect block pointers
  2010-07-26 19:58 [U-Boot] [PATCH] ext2fs: Fix optimization bug for doubly-indirect block pointers Aaron Pace
       [not found] ` <4C4DEEC7.7010105@alcatel-lucent.com>
@ 2010-08-08 23:01 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2010-08-08 23:01 UTC (permalink / raw)
  To: u-boot

Dear Aaron Pace,

In message <4C4DE8DC.4020500@alcatel-lucent.com> you wrote:
> 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,

This patch is line-wrapped, please make sure to fix yourmailer.


This has already been applied, so no need to resubmit.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
KLB is an acronym for `Known Lazy Bastard', aka non-FAQ  reader,  aka
person  who  would  rather  make  someone  take their time to explain
something basic than look it up in a  FAQ.
         -- Tom Christiansen in <6aq547$mnr$2@csnews.cs.colorado.edu>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-08 23:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26 19:58 [U-Boot] [PATCH] ext2fs: Fix optimization bug for doubly-indirect block pointers Aaron Pace
     [not found] ` <4C4DEEC7.7010105@alcatel-lucent.com>
2010-07-26 20:24   ` Aaron Pace
2010-08-07 21:02     ` Wolfgang Denk
2010-08-08 23:01 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox