Skip to contentSkip to conversation

question > new jffs2 partition

DISCUSSION gxk 2 participants 2 messages Mar 19, 2008 Memory technology devices (MTD)

lore
Share & tools
lore

gxk

author
#0 lore raw

Does the kernel format erased flash, defined as partition?

From the Uboot prompt i erase the space:
erase 0xa0000000 +2800000

Configured my kernel to have 3 partitions.
The 3rd is started at address 0xa0000000 with size 0x2800000. This partition mounted at system boot:

mount -t jffs22 /dev/mtdblock/2 /mnt

and after simple make dir

mkdir -p /mnt/abcd

Now, when i start the system 1st time, it is taking more time to load at the `mkdir'. All follow reboots go smooth.

It is look like mtd driver formats the partition. Can anybody confirm this? When is it happen?

Thanks for help.

#1 lore raw
Quoted 13 lines · gxk

Does the kernel format erased flash, defined as partition?

From the Uboot prompt i erase the space:
erase 0xa0000000 +2800000

Configured my kernel to have 3 partitions.
The 3rd is started at address 0xa0000000 with size 0x2800000. This partition mounted at system boot:

mount -t jffs22 /dev/mtdblock/2 /mnt

and after simple make dir

Quoted 7 lines

mkdir -p /mnt/abcd

Now, when i start the system 1st time, it is taking more time to load at the `mkdir'. All follow reboots go smooth.

It is look like mtd driver formats the partition. Can anybody confirm this? When is it happen?

mtd doesn't, but the jffs2 driver erases all seemingly empty blocks and writes cleanmarkers to them. This is ultimately handled by the pdflush kernel task once the kernel is up and running, and for some reason it takes quite a while to accomplish, e.g. pdflush runs with a high CPU load for a minute or so although the required operations would take just a few seconds. I once tried to dive into the code to figure out why but failed to come up with anything.

/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30