ext2fs: Fix optimization bug for doubly-indirect block pointers
PATCH 1/1 ext2fs: Fix optimization bug for doubly-indirect block pointers
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.
--- fs/ext2/ext2fs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext2/ext2fs.c +0 -0
@@ -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);Signature · 1 line
1.5.4.3
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 ext2fs: Fix optimization bug for doubly-indirect block pointers
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.
---fs/ext2/ext2fs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext2/ext2fs.c +1 -1
@@ -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);
Signature · 1 line
1.5.4.3
PATCH 1/1 ext2fs: Fix optimization bug for doubly-indirect block pointers
Dear Aaron Pace,
Quoted 1 line · In message <[email protected]> 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.
Quoted 10 lines
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 <[email protected]>---
^^^^^^^^^
Here is where comments may be added.
Quoted 2 lines
fs/ext2/ext2fs.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)
Applied manually.
Thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
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 <[email protected]>PATCH 1/1 ext2fs: Fix optimization bug for doubly-indirect block pointers
In reply to Aaron PaceDear Aaron Pace,
Quoted 18 lines · In message <[email protected]> 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 <[email protected]>--- fs/ext2/ext2fs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/ext2/ext2fs.c +0
-0
fs/ext2/ext2fs.c static int ext2fs_read_block (ext2fs_node_t node, · line 370
Quoted 8 lines
fs/ext2/ext2fs.c +1
-1@@ -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
Signature · 7 lines
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 <[email protected]>