From: Seongsu Lee <senux@senux.com>
To: linux-mtd@lists.infradead.org
Cc: alex@emcraft.com, Josh Boyer <jwboyer@gmail.com>
Subject: Re: FAT file system on NAND flash memory
Date: Wed, 30 May 2007 02:09:26 +0900 [thread overview]
Message-ID: <20070529170925.GA11279@pooky.senux.com> (raw)
In-Reply-To: <625fc13d0704120655u2f452b12ge9315f47b951aa34@mail.gmail.com>
On Thu, Apr 12, 2007 at 08:55:23AM -0500, Josh Boyer wrote:
> On 4/12/07, Seongsu Lee <senux@senux.com> wrote:
> > Hi,
> >
> > In my knowledge, mtdblock.c must be used to use
> > FAT filesystem on bare NAND flash memories
> > because NFTL is made only for a specific hardware,
> > DiskOnChip.
> >
> > (Layer 0) VFS
> > (Layer 1) FAT (or EXT2, EXT3)
> > (Layer 2) mtdblock.c (nftl.c can be used only with DiskOnChip)
> > (Layer 3) NAND flash memory driver (vendor specific)
> > (Layer 4) Physical NAND flash memory
> >
> > Please let me know if it is wrong.
>
> That layering is correct, but your results will be bad. mtdblock
> doesn't handle bad blocks. So if you have one in the middle of your
> filesystem, it will break things. You need some kind of translation
> layer if you're going to use NAND.
>
> josh
I did not know that ftl.c is can be used also in 'Layer 2' instead
of dummy mtdblock.c. It's working. I confirmed that the ftl.c can
be used on mtdram. I will test whether it works on a physical
bare-nand flash memory. (maybe tomorrow)
Follow is what I have tested for a mtdram (64MB).
root@thermopylae:/mnt # modprobe mtdram
root@thermopylae:/mnt # modprobe mtdchar
root@thermopylae:/mnt # ftl_format /dev/mtd0
Partition size = 64 mb, erase unit size = 128 kb, 1 transfer units
Reserved 5%, formatted size = 62883328 bytes
Erasing all blocks...
+++++++*+++++++*+++++++*+++++++*+++++++*+++++++*+++++++*+++++++*
Writing erase unit headers...
format successful.
root@thermopylae:/mnt # modprobe ftl
root@thermopylae:/mnt # lsmod
Module Size Used by
ftl 11404 0
mtd_blkdevs 10368 1 ftl
mtdchar 9092 0
mtdram 3972 0
mtdcore 7172 6 mtd_blkdevs,mtdchar,mtdram
autofs4 22788 1
3c59x 43560 0
b44 27276 0
ext3 122504 1
jbd 59048 1 ext3
root@thermopylae:/mnt # mkfs.ext3 /dev/ftla
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
15360 inodes, 61408 blocks
3070 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=62914560
8 block groups
8192 blocks per group, 8192 fragments per group
1920 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@thermopylae:/mnt # mount /dev/ftla /mnt/data0
root@thermopylae:/mnt # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 29G 9.7G 18G 36% /
tmpfs 507M 0 507M 0% /dev/shm
/dev/hdb1 95G 126M 90G 1% /mnt/data1
/dev/ftla 59M 5.2M 50M 10% /mnt/data0
--
Seongsu's personal blog - http://www.senux.com/
lp1 on fire (One of the more obfuscated kernel
messages)
prev parent reply other threads:[~2007-05-29 17:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-12 13:41 FAT file system on NAND flash memory Seongsu Lee
2007-04-12 13:55 ` Josh Boyer
2007-04-26 17:59 ` Seongsu Lee
2007-04-27 13:45 ` Josh Boyer
2007-04-27 12:50 ` Matthieu CASTET
2007-04-27 13:45 ` Josh Boyer
2007-05-29 17:09 ` Seongsu Lee [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=20070529170925.GA11279@pooky.senux.com \
--to=senux@senux.com \
--cc=alex@emcraft.com \
--cc=jwboyer@gmail.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.