Hello Michael, Michael Lawnick wrote: > I have put these patches to our board (MPC8548, NOR Flash, MTD partition > size 48MB). > > a) performance has improved (execution time of 'ls' reduced from ~16s to > ~1.5s) >
Sounds good. That is what we were expecting. > b) there is a bug in the patch > 0005-jffs2-add-buffer-to-cache-flash-accesses: > The passage > > @@ -724,12 +731,14 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 > inode, char *dest) > latestVersion = jNode->version; > } > } > - put_fl_mem(jNode); > + if (pL->readbuf == NULL) > + put_fl_mem(jNode); > } > #endif > > should be > > @@ -724,12 +731,14 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 > inode, char *dest) > latestVersion = jNode->version; > } > } > - put_fl_mem(jNode); > + if (pL->readbuf == NULL) > + put_fl_mem(jNode, NULL); > } > #endif > You are right. We haven't just tried to use CFG_JFFS2_SORT_FRAGMENTS... > c) I found no improvement with CFG_JFFS2_SORT_FRAGMENTS set (the way I > detected b) ;-) > Same as above... We don't use CFG_JFFS2_SORT_FRAGMENTS... But it's very sad result really... I have no idea what is wrong with it... > d) output of 'ls' is corrupted: no date and access right output, > directories in / are shown multiple times Can you please be more specific on this? Is this with CFG_JFFS2_SORT_FRAGMENTS enabled or not? How did you create your FS? I can't reproduce any of described symptoms on our system... The only thing I can tell you for now is that the first patch from my posting is wrong, the following patch fixes the problem: >From 38d2055f7b493af858c96d1db2aa5cef78adeae1 Mon Sep 17 00:00:00 2001 From: Ilya Yanok <[EMAIL PROTECTED]> Date: Wed, 15 Oct 2008 16:22:35 +0200 Subject: jffs2: fix sector_size calculation in case of NOR flash Need to take all sectors into account then calculating sector_size for NOR flashes. Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]> --- common/cmd_jffs2.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index e7f07bf..2fc0b7d 100644 --- a/common/cmd_jffs2.c +++ b/common/cmd_jffs2.c @@ -344,7 +344,9 @@ static int part_validate_nor(struct mtdids *id, struct part_info *part) flash = &flash_info[id->num]; - part->sector_size = 0; + /* size of last sector */ + part->sector_size = flash->size - + (flash->start[flash->sector_count-1] - flash->start[0]); offset_aligned = 0; for (i = 0; i < flash->sector_count; i++) { @@ -360,6 +362,7 @@ static int part_validate_nor(struct mtdids *id, struct part_info *part) } end_offset = part->offset + part->size; + offset_aligned = 0; for (i = 0; i < flash->sector_count; i++) { if (i) { sector_size = flash->start[i] - flash->start[i-1]; @@ -367,10 +370,10 @@ static int part_validate_nor(struct mtdids *id, struct part_info *part) part->sector_size = sector_size; } if ((flash->start[i] - flash->start[0]) == end_offset) - return 0; + offset_aligned = 1; } - if (flash->size == end_offset) + if (offset_aligned || flash->size == end_offset) return 0; printf("%s%d: partition (%s) size alignment incorrect\n", -- 1.5.6.1 You can try it. But I think the only affected case is summary enabled FS which is rather rare. Regards, Ilya. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot