All of lore.kernel.org
 help / color / mirror / Atom feed
* jffs2 filesystem/flash data integrity
@ 2009-04-19  2:55 Manoj
  2009-04-19  7:33 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Manoj @ 2009-04-19  2:55 UTC (permalink / raw)
  To: linux-mtd

Hi,

I have a jffs2 filesystem on NAND flash. After mounting the jffs2 fs,
I create a 2MB file and make a copy of it using "cp" command. When I
do a "diff" between two files, the files are same. Now, I unmount the
fs and re-mount it. When I do a "diff" between the two files, they
differ. Looking at the difference, I see that around 4K of data in one
file has 0s in it. This 4K hole can be anywhere in the file.  There is
no issue with a 1MB file.

I use the following command to mount:
mount -t jffs2 -osync /dev/mtdb-boot2 /mnt/jff

The NAND page size is 512 bytes and block size if 16K.

What could be going wrong? I have also tried doing a "sync" after
creating the second file. Is this a driver issue?

Any hints appreciated.
Please cc me in the reply as I am not subscribed.

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: jffs2 filesystem/flash data integrity
  2009-04-19  2:55 jffs2 filesystem/flash data integrity Manoj
@ 2009-04-19  7:33 ` David Woodhouse
  2009-04-20 18:27   ` Manoj
  0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2009-04-19  7:33 UTC (permalink / raw)
  To: Manoj; +Cc: linux-mtd

On Sat, 2009-04-18 at 19:55 -0700, Manoj wrote:
> Hi,
> 
> I have a jffs2 filesystem on NAND flash. After mounting the jffs2 fs,
> I create a 2MB file and make a copy of it using "cp" command. When I
> do a "diff" between two files, the files are same. Now, I unmount the
> fs and re-mount it. When I do a "diff" between the two files, they
> differ. Looking at the difference, I see that around 4K of data in one
> file has 0s in it. This 4K hole can be anywhere in the file.  There is
> no issue with a 1MB file.

Please reproduce with 'CONFIG_JFFS2_FS_DEBUG=1', capturing all kernel
message over a serial console. Also, take an image of the flash before
you remount it. Let me have both.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: jffs2 filesystem/flash data integrity
  2009-04-19  7:33 ` David Woodhouse
@ 2009-04-20 18:27   ` Manoj
  2009-04-21  9:15     ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Manoj @ 2009-04-20 18:27 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

Hi David,

How do you want me to give the image that's on the flash? It is in megabytes.
Or do you want me to give the output of jffs2dump for the image?

Thanks.

On Sun, Apr 19, 2009 at 12:33 AM, David Woodhouse <dwmw2@infradead.org> wrote:
> On Sat, 2009-04-18 at 19:55 -0700, Manoj wrote:
>> Hi,
>>
>> I have a jffs2 filesystem on NAND flash. After mounting the jffs2 fs,
>> I create a 2MB file and make a copy of it using "cp" command. When I
>> do a "diff" between two files, the files are same. Now, I unmount the
>> fs and re-mount it. When I do a "diff" between the two files, they
>> differ. Looking at the difference, I see that around 4K of data in one
>> file has 0s in it. This 4K hole can be anywhere in the file.  There is
>> no issue with a 1MB file.
>
> Please reproduce with 'CONFIG_JFFS2_FS_DEBUG=1', capturing all kernel
> message over a serial console. Also, take an image of the flash before
> you remount it. Let me have both.
>
> --
> dwmw2
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: jffs2 filesystem/flash data integrity
  2009-04-20 18:27   ` Manoj
@ 2009-04-21  9:15     ` David Woodhouse
  2009-04-28  2:30       ` Manoj
  0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2009-04-21  9:15 UTC (permalink / raw)
  To: Manoj; +Cc: linux-mtd

On Mon, 2009-04-20 at 11:27 -0700, Manoj wrote:
> How do you want me to give the image that's on the flash? It is in
> megabytes. Or do you want me to give the output of jffs2dump for the
> image?

The output of jffs2dump might be sufficient, but the image itself is
probably best, if you can. Stick it on a web/ftp site somewhere?

-- 
dwmw2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: jffs2 filesystem/flash data integrity
  2009-04-21  9:15     ` David Woodhouse
@ 2009-04-28  2:30       ` Manoj
  2009-05-01  2:32         ` Manoj
  0 siblings, 1 reply; 6+ messages in thread
From: Manoj @ 2009-04-28  2:30 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

Hi David,

When I set 'CONFIG_JFFS2_FS_DEBUG=1', the problem goes away :-(.  With
that flag set to 0, I occasionally see
"JFFS2 notice: (133) jffs2_get_inode_nodes: Node header CRC failed at
xxxx" messages. Should I worry about it?

When I make a copy of the file, does it get written to the flash right
away or does the write happen later? I am doing a "sync" after the
"cp" command. An interesting thing to note is that the 0s can appear
in both original and the copied file.

As a separate test, I write 3MB of data and read it back with
mtd_debug utility; the compare passes.

Thanks.


On Tue, Apr 21, 2009 at 2:15 AM, David Woodhouse <dwmw2@infradead.org> wrote:
> On Mon, 2009-04-20 at 11:27 -0700, Manoj wrote:
>> How do you want me to give the image that's on the flash? It is in
>> megabytes. Or do you want me to give the output of jffs2dump for the
>> image?
>
> The output of jffs2dump might be sufficient, but the image itself is
> probably best, if you can. Stick it on a web/ftp site somewhere?
>
> --
> dwmw2
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: jffs2 filesystem/flash data integrity
  2009-04-28  2:30       ` Manoj
@ 2009-05-01  2:32         ` Manoj
  0 siblings, 0 replies; 6+ messages in thread
From: Manoj @ 2009-05-01  2:32 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

David,
The problem exists after enabling jffs2 debug. I do have a capture of
dmesg output. How do you want me to send the file? It is 78K in size.
Can I attach and send it to your personal account? I don't have a ftp
server to upload it to.

Thanks.

On Mon, Apr 27, 2009 at 7:30 PM, Manoj <manoj23@gmail.com> wrote:
> Hi David,
>
> When I set 'CONFIG_JFFS2_FS_DEBUG=1', the problem goes away :-(.  With
> that flag set to 0, I occasionally see
> "JFFS2 notice: (133) jffs2_get_inode_nodes: Node header CRC failed at
> xxxx" messages. Should I worry about it?
>
> When I make a copy of the file, does it get written to the flash right
> away or does the write happen later? I am doing a "sync" after the
> "cp" command. An interesting thing to note is that the 0s can appear
> in both original and the copied file.
>
> As a separate test, I write 3MB of data and read it back with
> mtd_debug utility; the compare passes.
>
> Thanks.
>
>
> On Tue, Apr 21, 2009 at 2:15 AM, David Woodhouse <dwmw2@infradead.org> wrote:
>> On Mon, 2009-04-20 at 11:27 -0700, Manoj wrote:
>>> How do you want me to give the image that's on the flash? It is in
>>> megabytes. Or do you want me to give the output of jffs2dump for the
>>> image?
>>
>> The output of jffs2dump might be sufficient, but the image itself is
>> probably best, if you can. Stick it on a web/ftp site somewhere?
>>
>> --
>> dwmw2
>>
>>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-01  2:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-19  2:55 jffs2 filesystem/flash data integrity Manoj
2009-04-19  7:33 ` David Woodhouse
2009-04-20 18:27   ` Manoj
2009-04-21  9:15     ` David Woodhouse
2009-04-28  2:30       ` Manoj
2009-05-01  2:32         ` Manoj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.