* FAT file system on NAND flash memory
@ 2007-04-12 13:41 Seongsu Lee
2007-04-12 13:55 ` Josh Boyer
0 siblings, 1 reply; 7+ messages in thread
From: Seongsu Lee @ 2007-04-12 13:41 UTC (permalink / raw)
To: linux-mtd
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.
--
Seongsu's personal blog - http://www.senux.com/
LILO, you've got me on my knees! (from David Black,
dblack@pilot.njin.net, with apologies to Derek and the
Dominos, and Werner Almsberger)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAT file system on NAND flash memory
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
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Josh Boyer @ 2007-04-12 13:55 UTC (permalink / raw)
To: Seongsu Lee; +Cc: linux-mtd
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAT file system on NAND flash memory
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-05-29 17:09 ` Seongsu Lee
2 siblings, 1 reply; 7+ messages in thread
From: Seongsu Lee @ 2007-04-26 17:59 UTC (permalink / raw)
To: linux-mtd; +Cc: Josh Boyer
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.
Thank you for the reply.
Just one more question.
Could you tell me the reason that there is no translation layer code
in MTD for bare flash memories?
(Because of patent or copyright? or technical reason? I wonder.)
--
Seongsu's personal blog - http://www.senux.com/
Beauty may be skin deep, but ugly goes clear to the
bone. -- Redd Foxx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAT file system on NAND flash memory
2007-04-12 13:55 ` Josh Boyer
2007-04-26 17:59 ` Seongsu Lee
@ 2007-04-27 12:50 ` Matthieu CASTET
2007-04-27 13:45 ` Josh Boyer
2007-05-29 17:09 ` Seongsu Lee
2 siblings, 1 reply; 7+ messages in thread
From: Matthieu CASTET @ 2007-04-27 12:50 UTC (permalink / raw)
To: Josh Boyer; +Cc: linux-mtd, Seongsu Lee
Hi,
Josh Boyer a écrit :
> 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.
>
But UBI could be used between nand and mtdblock ?
Matthieu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAT file system on NAND flash memory
2007-04-26 17:59 ` Seongsu Lee
@ 2007-04-27 13:45 ` Josh Boyer
0 siblings, 0 replies; 7+ messages in thread
From: Josh Boyer @ 2007-04-27 13:45 UTC (permalink / raw)
To: Seongsu Lee; +Cc: linux-mtd
On 4/26/07, Seongsu Lee <senux@senux.com> wrote:
> 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.
>
> Thank you for the reply.
>
> Just one more question.
>
> Could you tell me the reason that there is no translation layer code
> in MTD for bare flash memories?
Because most users of MTD already handle bad blocks themselves on bare
NAND. JFFS2, yaffs, etc. all have bad block handling contained within
them.
UBI can be used for things that lack the proper translation
themselves. JFFS2 can even run on top if a UBI volume. Perhaps you
should check into that.
josh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAT file system on NAND flash memory
2007-04-27 12:50 ` Matthieu CASTET
@ 2007-04-27 13:45 ` Josh Boyer
0 siblings, 0 replies; 7+ messages in thread
From: Josh Boyer @ 2007-04-27 13:45 UTC (permalink / raw)
To: Matthieu CASTET; +Cc: linux-mtd, Seongsu Lee
On 4/27/07, Matthieu CASTET <matthieu.castet@parrot.fr> wrote:
> Hi,
>
> Josh Boyer a écrit :
> > 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.
> >
> But UBI could be used between nand and mtdblock ?
Yep, indeed it can.
josh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FAT file system on NAND flash memory
2007-04-12 13:55 ` Josh Boyer
2007-04-26 17:59 ` Seongsu Lee
2007-04-27 12:50 ` Matthieu CASTET
@ 2007-05-29 17:09 ` Seongsu Lee
2 siblings, 0 replies; 7+ messages in thread
From: Seongsu Lee @ 2007-05-29 17:09 UTC (permalink / raw)
To: linux-mtd; +Cc: alex, Josh Boyer
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)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-05-29 17:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox