Creating an ext3 partition on an mtd device

Artem Bityutskiy dedekind1 at gmail.com
Thu Aug 27 02:29:20 EDT 2009


On Thu, 2009-08-27 at 08:59 +0300, Mark Ryden wrote:
> Hello, Justin,
> Thanks for your answer.
> 
> Then why do I have in "Essential Linux Device Drivers" this , in
> "Block Device Emulation" section of chapter 17, "Memory Technology
> Devices" , this:
> 
> Block Device Emulation
> The MTD subsystem provides a block driver called mtdblock that
> emulates a hard disk over flash memory. You can put any filesystem,
> say EXT2, over the emulated flash disk. Mtdblock hides complicated
> flash access procedures (such as preceding a write with an erase of
> the corresponding sector) from the filesystem. Device nodes created by
> mtdblock are named /dev/mtdblock/X, where X is the partition number.
> To create an EXT2 filesystem on the pda_fs partition of the handheld,
> as shown in Figure 17.2, do the following:
> bash> mkfs.ext2 /dev/mtdblock/2                 Create an EXT2 filesystem
>                                                  on the second partition
> 
> bash> mount /dev/mtdblock/2 /mnt                Mount the partition

mtdblock does not do any bad block handling, so you cannot use it with
NAND. And it does not do any wear-leveling, and it has zero tolerance to
power cuts.

I think the text above assumes that you have NOR, you do not care about
WL and power-cuts.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list