Skip to contentSkip to conversation

mtd caching in kernel 2.6

DISCUSSION Hyphen79 2 participants 2 messages Jun 11, 2008 Memory technology devices (MTD)

lore
Share & tools
lore

Hyphen79

author
#0 lore raw

Hello,

I have a problem with my mtdblock root device with the 2.6 kernel. When I write data to a mtd partition, which is not the root, the data will be written immediately. But when I write something to the root partition, it will be cached and written to it after a while (~30sec). What could this be and how could I deactivate the caching? - the root is a cramdisk, not JFFS2 - and I have no problems with the 2.4 kernel.

Many thanks ahead!

#1 lore raw
Quoted 7 lines · On 6/11/08, Hyphen79 <[email protected]> wrote:

Hello,

I have a problem with my mtdblock root device with the 2.6 kernel. When I write data to a mtd partition,
which is not the root, the data will be written immediately. But when I write something to the root partition,
it will be cached and written to it after a while (~30sec).

Yes, cause your root is cramdisk, goes to block device layer mtdblock.c Which is cache designed. Your other partitions works with JFFS2 or Yaffs2 which goes directly on MTD nand_base.c or similar file.

What could

Quoted 3 lines

this be and how could I deactivate
the caching? - the root is a cramdisk, not JFFS2 - and I have no problems with the 2.4 kernel.

No, you can't deactiveate the caching. But you can avoid it by using JFFS2 or YAFFS2 as your rootfs. I think your case have nothing to do with the kernel version. It should be the same with 2.4 kernel.

Signature · 2 lines
Best wishes,
Nancy