public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: angelo <angelo70@gmail.com>
To: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Cc: Ricard Wanderlof <ricard.wanderlof@axis.com>
Subject: Re: help request, jffs2 fs files get lost
Date: Mon, 02 May 2011 11:16:42 +0200	[thread overview]
Message-ID: <4DBE767A.5060703@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1105021057420.15966@lnxricardw.se.axis.com>

On 02/05/2011 10:58, Ricard Wanderlof wrote:
>
> On Mon, 2 May 2011, angelo wrote:
>
>> If this is in fact what you're doing, you're overwriting your 
>> jffs2.img file with the all-ff's contents of the newly erased 
>> /dev/mtd2. Swap the two arguments instead.
>>
>> sorry, was just a bad had-written text,
>> i generally do "cp jffs2.img /dev/mtd2", and after mounting mtdblock2 
>> i see correctly the root tree.
>>
>> I did some other tests:
>> if i mount the new created jffs2 and unmount it, nothing is lost.
>> If i mount it, open a file, append some text, close it and unmount, 
>> then at the next mount everything is disapperaed (checking mtd2, all 
>> is set to 0xff).
>>
>> Saving modified files i notice a warning:
>> Writing files is also notice some MTD debug trace, maybe an error:
>> Node totlen on flash (0xffffffff) != totlen from node ref (0x00000074)
>
> Out of curiosity, what exactly is the type of flash you are using?
>
> /Ricard

Hi Ricard,

thanks again for help

the flash chip is an SST 39VF2301B, word programmable, tot 4MB, 4KB 
sector size, 64K block size, it is very similar to an AMD 16bit data bus 
width flash.

It seems to be correctly detected from jedec probe, but through CFI 
queries probably

...
physmap platform flash device: 00400000 at ffc00000
physmap-flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer 
ID 0x0000bf Chip ID 0x00235d
number of CFI chips: 1
...

/proc # cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00010000 00001000 "Colilo (64K)"
mtd1: 002f0000 00001000 "Kernel+ROMfs (3008K)"
mtd2: 00100000 00001000 "JFFS2 (1024K)"
mtd3: 0009d000 00001000 "ROMfs"

This is a suspected sequence of MTD commands i find in dmesg:

...
MTD_ioctl
MTD_ioctl
MTD_ioctl
MTD_ioctl
MTD_ioctl
MTD_ioctl
MTD_close
MTD_open
MTD_write
MTD_close
Node totlen on flash (0xffffffff) != totlen from node ref (0x00000074)
MTD_open <-- jffs2 fs disapperaed from here
MTD_read
MTD_read
...

many thanks,
angelo

      reply	other threads:[~2011-05-02  9:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-01 11:35 help request, jffs2 fs files get lost Angelo Dureghello
2011-05-02  6:55 ` Ricard Wanderlof
2011-05-02  8:43   ` angelo
     [not found]   ` <4DBE6BCD.3050400@gmail.com>
2011-05-02  8:58     ` Ricard Wanderlof
2011-05-02  9:16       ` angelo [this message]

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=4DBE767A.5060703@gmail.com \
    --to=angelo70@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=ricard.wanderlof@axis.com \
    /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