public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Paul MAILLET <paulmaillet37@gmail.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] JFFS2 mounting issue
Date: Fri, 01 Jul 2011 09:21:00 -0000	[thread overview]
Message-ID: <BANLkTikgQpih77wdo9JJt5heaf06dafToA@mail.gmail.com> (raw)

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

                 reply	other threads:[~2011-07-01  9:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikgQpih77wdo9JJt5heaf06dafToA@mail.gmail.com \
    --to=paulmaillet37@gmail.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).