[JFFS2] Request help on EBS option in Linux-2.6.21.5
zheng shi
neversetsun at gmail.com
Tue Oct 7 23:36:13 EDT 2008
I got a little confused about making an empty file system.
I think "flash_eraseall /dev/mtdX" will do, but I get messages like:
...
JFFS2: Erase block at 0x03f40000 is not formatted. It will be erased
JFFS2: Erase block at 0x03f80000 is not formatted. It will be erased
JFFS2: Erase block at 0x03fc0000 is not formatted. It will be erased
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 256
So I changed my way:
1. mkdir empty
2. mkfs.jffs2 -e 0x40000 -s 0x800 --pad=0x40000 -n -d empty/ -o img/emtpy.img
(-p 0x40000 seems not to work, it just generates an image with zero
size, only long option --pad generates an image with 256*1024 byte)
3. nandwrite -a -p -m /dev/mtd3 img/empty.img
Have I mistaken anything?
BTW,
My NAND flash's parameter:
page size: 2KB
oob size: 64B
Block size: 256KB
On Fri, Oct 3, 2008 at 3:03 PM, David Woodhouse <dwmw2 at infradead.org> wrote:
> On Thu, 2008-10-02 at 10:00 +0800, zheng shi wrote:
>>
>>
>> I'm using JFFS2 in linux-2.6.21.5.
>>
>> When I enabled JFFS2 summary support (EXPERIMENTAL) option, the EBS
>> mechanism did promote mount time.
>> But unfortunately files (size>10k) couldn't be written on flash
>> permanently, i.e., though cp was done, but when remount the file just
>> copied disappeared.
>
> That's strange. Can you reproduce on an empty file system? Just mount it
> empty, write the large file, then unmount. Take a snapshot of the
> contents of the flash. Then mount it, confirm that the file is missing,
> and show me the contents of the flash.
>
> Also, build your kernel with CONFIG_JFFS2_FS_DEBUG=1 and capture all the
> debug output (over a serial port) when you mount the offending file
> system.
>
> The 2.6.21.5 kernel isn't particularly interesting though -- please try
> something more recent, first.
>
>> I have tried -o sync with mount option.
>
> That should make no difference.
>
> --
> David Woodhouse Open Source Technology Centre
> David.Woodhouse at intel.com Intel Corporation
>
>
--
Regards, neversetsun
More information about the linux-mtd
mailing list