linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johnny Hung <johnny.hacking@gmail.com>
To: linux-embedded@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-mtd@lists.infradead.org
Subject: jffs2_gcd_mtdx thread and umount problem.
Date: Mon, 18 Jan 2010 15:04:28 +0800	[thread overview]
Message-ID: <cb9ecdfa1001172304q132d5324qa963d0d5cdfb7806@mail.gmail.com> (raw)

Hi All,

I have a customized MPC8313 (ppc arch) board with SPANSION 64MB NOR
flash, everything works fine but I found a abnormal about JFFS2 flahs
filesystem.

The system will mount JFFS2 to /mnt/mtd when system boot up. I try to
execute umount /mnt/mtd or sync or reboot right away after login then
these commands hangs. Use ps command to check process status and is D
(Uninterruptible sleep, usually IO). I try to kill jffs2_gcd_mtd4 and
umount/reboot/syc commands execute successfully. I think
jffs2_gcd_mtd4 (mount /dev/mtd4) do something in the background so I
wait for 10 minutes after login and execute the same commands and it
doesn't hangs.

The following procedure is I to make jffs2 file system and write to
flash then mount to /mnt/mtd.

1. mkfs.jffs2 -d mtd -e 0x20000 --pad 0x3080000 -o mtd.jffs2 (erase
block size is 128KB and jffs2 partition size is 48.5MB)

2. write jffs2 file system to flash in uboot.
      tftpboot 200000 mtd.jffs2;                (load mtd.jffs2 to memory)
      protect off f8f80000 fbffffff;
      erase f8f80000 fbffffff;                       (erase all 48.5MB)
      cp.b 200000 f8f80000 $filesize;     (program mtd.jffs2 to flash)
      protect on f8f80000 fbffffff;
      cmp.b 200000 f8f80000 $filesize

3. Add below in /etc/fstab file to mount to /mnt/mtd
      /dev/mtdblock4  /mnt/mtd        jffs2   defaults        1       1

Does anyone knows what purpose for jffs2_gcd_mtdx thread and why it
cause umount/sync/reboot commands hangs it is reasonable or  something
I did wrong?

BRs, H. Johnny

             reply	other threads:[~2010-01-18  7:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18  7:04 Johnny Hung [this message]
2010-01-18  7:57 ` jffs2_gcd_mtdx thread and umount problem Joakim Tjernlund
2010-01-18  8:26   ` Johnny Hung
2010-01-18  9:13     ` Joakim Tjernlund

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=cb9ecdfa1001172304q132d5324qa963d0d5cdfb7806@mail.gmail.com \
    --to=johnny.hacking@gmail.com \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.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 NNTP newsgroup(s).