large-nand flash mount ?
Artem B. Bityutskiy
dedekind at infradead.org
Tue Sep 27 07:57:04 EDT 2005
On Tue, 2005-09-27 at 20:24 +0900, 최영일 wrote:
> Hi
> I am developing system with cpu au1550 and 2G nand flash?
> I want root filesystem by 2G nand flash.
> for test, I can mount nand flash and read, write to flash.
> so, I make jffs2 filesystem and write to flash.
> then, I make to boot with boot argument(root=/dev/mtdblock0), but fail
> the message follows
> ----------------------------
> mtdblock_open
> ok
> mtdblock: read on "Db1550 NAND FS 0" at 0x400, size 0x200
> nand_read_ecc: from = 0x00000400, len = 512
> mtdblock: read on "Db1550 NAND FS 0" at 0x600, size 0x200
> nand_read_ecc: from = 0x00000600, len = 512
> mtdblock_release
> nand_sync: called
> ok
Even if you have healed your problems with MTD, JFFS2 is anyway unusable
on large flashes. Hmm, MTD archive seems broken, so I just insert here
my recent reply to similar questions.
-------- Original Message --------
Subject: Re: fragtree method?
Date: Mon, 26 Sep 2005 12:16:01 +0400
From: Artem B. Bityutskiy <dedekind at yandex.ru>
To: hinko.kocevar at cetrtapot.si <hinko.kocevar at cetrtapot.si>
CC: Linux MTD <linux-mtd at lists.infradead.org>
References: <4337A604.6050204 at cetrtapot.si>
Hello Hinko,
hinko.kocevar at cetrtapot.si wrote:
> Hello all,
>
> We are using JFFS2 fs on toshiba NAND flash. There are several
> partitions defined, but scan time at boot time gets longer every day
of
> usage. Eg. when flash is empty it takes ~10 s to mount 20Mb of flash
in
> 3 partitions later when there are some files present it takes > 30s
and
> increasing.
The picture you are observing is normal for JFFS2. The more data is in
your flash, the longer is JFFS2 being mounted. I would shortly explain
this as follows.
There is no indexing information stored on the flash media. Each JFFS2
node contains full information about itself, but there is no central
index. The index is the crucial part of any file system as it is used
to
quickly locate any piece of information (i.e., find all the files kept
in a directory, find the physical flash address where the files data is
stored, etc.). In JFFS2, the index is maintained in RAM and takes
significant amount of it. Roughly speaking, there is a in-RAM data
structure for each on-flash node.
The in RAM index must be built on each mount. For this reason, JFFS2
must scan the flash media. And it is logically then the more data you
have on flash, the longer is JFFS2 mount time and memory consumption.
Namely, the above 2 characteristics linearly depend on the flash size
(O(N), N - flash size).
You may also glance at
http://www.linux-mtd.infradead.org/tech/JFFS3design.pdf for some
additional info.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
More information about the linux-mtd
mailing list