All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michel Marti <mma@objectxp.com>
To: linux-mtd@lists.infradead.org
Subject: JFFS2: Filesystem corruption after umount/mount
Date: Tue, 20 Mar 2007 13:15:56 +0100	[thread overview]
Message-ID: <etoj9s$b84$1@sea.gmane.org> (raw)

Hello,

I'm experiencing a strange problem with JFFS2 using Linux 2.6.21-rc4-g78157a82 from
denx.de on PowerPC. After unmounting and remounting the filesystem, some directory entries
are corrupt. See the transcript below.

Flash in use is a Spansion S29GL256N. I'm using the physmap driver and pass the MTD
partition layout on the kernel command line.

# eraseall /dev/mtd3
# mount -t jffs2 /dev/mtdblock3 /mnt
# touch /mnt/printf /mnt/printenv
# ls -l /mnt
-rw-r--r--    1 root     root            0 Jan  1 00:37 printenv
-rw-r--r--    1 root     root            0 Jan  1 00:37 printf

# umount /mnt
# mount -t jffs2 /dev/mtdblock3 /mnt
# ls -l /mnt
ls: /mnt/prin: No such file or directory
-rw-r--r--    1 root     root            0 Jan  1 00:37 printf


# umount /mnt
# eraseall /dev/mtd3
# mount -t jffs2 /dev/mtdblock3 /mnt
# for I in `seq 0 9`; do F=$F$I; touch /mnt/$F; done
# ls -l /mnt
-rw-r--r--    1 root     root            0 Jan  1 00:50 0
-rw-r--r--    1 root     root            0 Jan  1 00:50 01
-rw-r--r--    1 root     root            0 Jan  1 00:50 012
-rw-r--r--    1 root     root            0 Jan  1 00:50 0123
-rw-r--r--    1 root     root            0 Jan  1 00:50 01234
-rw-r--r--    1 root     root            0 Jan  1 00:50 012345
-rw-r--r--    1 root     root            0 Jan  1 00:50 0123456
-rw-r--r--    1 root     root            0 Jan  1 00:50 01234567
-rw-r--r--    1 root     root            0 Jan  1 00:50 012345678
-rw-r--r--    1 root     root            0 Jan  1 00:50 0123456789

# umount /mnt
# mount -t jffs2 /dev/mtdblock3 /mnt
# ls -l /mnt
-rw-r--r--    1 root     root            0 Jan  1 00:50 0
-rw-r--r--    1 root     root            0 Jan  1 00:50 01
-rw-r--r--    1 root     root            0 Jan  1 00:50 012
-rw-r--r--    1 root     root            0 Jan  1 00:50 0123
-rw-r--r--    1 root     root            0 Jan  1 00:50 0123
-rw-r--r--    1 root     root            0 Jan  1 00:50 0123
-rw-r--r--    1 root     root            0 Jan  1 00:50 0123
-rw-r--r--    1 root     root            0 Jan  1 00:50 01234
-rw-r--r--    1 root     root            0 Jan  1 00:50 012345
-rw-r--r--    1 root     root            0 Jan  1 00:50 0123456


I also read back the mtd device after erasing it and it contains 0xFF bytes only.
Additionally, I copied a jffs2 image to the device, read it back and compared it to the
image and there was no difference.

(relevant) Output from kernel on startup:

physmap platform flash device: 02000000 at fc000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
4 cmdlinepart partitions found on MTD device physmap-flash.0
Adding 4 parsed mtd-partitions...
Creating 4 MTD partitions on "physmap-flash.0":
0x00000000-0x00040000 : "U"
0x00060000-0x00160000 : "K"
0x00160000-0x01f00000 : "R"
0x01f00000-0x02000000 : "C"


Any Hints?

--Michel


PS: I posted this to the jffs-dev list first, but somehow my post seems to have got
lost... In case it unexpectedly pops up there too: Sorry for the double posting.

             reply	other threads:[~2007-03-20 12:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-20 12:15 Michel Marti [this message]
2007-03-20 12:31 ` JFFS2: Filesystem corruption after umount/mount Josh Boyer
2007-03-20 12:37   ` Michel Marti
2007-03-20 13:21   ` Michel Marti
2007-03-20 12:56 ` Indrek Kruusa
2007-03-22 14:37 ` Michel Marti

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='etoj9s$b84$1@sea.gmane.org' \
    --to=mma@objectxp.com \
    --cc=linux-mtd@lists.infradead.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 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.