Mtd block access (jffs2 formatted) and mtd char access (unformatted) on different partitions of a single flash device

John Burch jburch at vincisystems.com
Tue May 20 16:53:30 EDT 2003


Is there a preferred way to access different mtd partitions of a single
flash device when certain accesses will be (1) block oriented via
standard file I/O of a jffs2 file system mounted on a /dev/mtdblockN
device and other accesses will be (2) character oriented via 'dd' (or
some other mechanism?) of unformatted/raw flash using /dev/mtdN?  Are
there any possibly bad interactions between mtd char and block device
access to the same device?

I've adopted a system that uses a driver with its own flash support to
read/write raw (non-jffs2) portions of the flash, while application code
uses standard file I/O to read/write jffs2 partitions on the same
device.  I'm concerned that these accesses may clash and possibly result
in corrupted flash, crashed kernel, etc.  Is this a legitimate concern
or does the mtd driver check flash status prior to any operations?


Thanks,
John





More information about the linux-mtd mailing list