From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12041 invoked by alias); 1 Jul 2011 09:21:34 -0000 Received: (qmail 12032 invoked by uid 22791); 1 Jul 2011 09:21:33 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qw0-f49.google.com (HELO mail-qw0-f49.google.com) (209.85.216.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jul 2011 09:21:17 +0000 Received: by qwi2 with SMTP id 2so1859816qwi.36 for ; Fri, 01 Jul 2011 02:21:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.218.132 with SMTP id hq4mr2587168qab.21.1309512076815; Fri, 01 Jul 2011 02:21:16 -0700 (PDT) Received: by 10.224.73.205 with HTTP; Fri, 1 Jul 2011 02:21:16 -0700 (PDT) Date: Fri, 01 Jul 2011 09:21:00 -0000 Message-ID: From: Paul MAILLET To: ecos-discuss@ecos.sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] JFFS2 mounting issue X-SW-Source: 2011-07/txt/msg00000.txt.bz2 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 : 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