Hi, I was doing some simple test to validate my solution using JFFS2 and I identified something strange. I wanted to know what was the behaviour of mounting the FS over a not fully erased range of memory. What I did is simple, I erased all the range used for JFFS2 (statically defined) and I programed only 20 bytes in this range with a random value. When mounting, the block is identified as not initialised :
<7>jffs2_scan_eraseblock(): Scanning block at 0x10000 <7>Read 0x400 bytes from 0x00010000 into buf <7>000: 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010000: 0x4141 instead <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010004: 0x4141 instead <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010008: 0x4141 instead <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001000c: 0x4141 instead <5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010010: 0x4141 instead <7>Found empty flash at 0x00010018 <7>Empty flash to end of buffer at 0x00010400 Then the scan tells that it will treat it as free space, and it will be erased : <7>Empty flash at 00010014 runs to end of block. Treating as free_space <7>Block at 0x00010000: free 0x0000ffec, dirty 0x00000014, unchecked 0x00000000, used 0x00000000 <5>JFFS2: Erase block at 0x00010000 is not formatted. It will be erased But it never does it and the mount finish on a failure as the count is not good : <5>Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes <5>empty_blocks 30, bad_blocks 0, c->nr_blocks 31 <7>build_fs failed <FAIL>: mount() returned -1 I/O error So I expected that it will erase the range which was not initialized and go on but it only tells that it will be erased and it never does it. Is it normal or do I missunderstood something? Best regards, Paul -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss