Mtd block access (jffs2 formatted) and mtd char access (unformatted) on different partitions of a single flash device
Charles Manning
manningc2 at actrix.gen.nz
Tue May 20 17:13:22 EDT 2003
On Wednesday 21 May 2003 08:53, John Burch wrote:
> 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?
This should not be a problem.
>
> 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?
It is mtd's job to handle this sort of thing.
-- CHarles
More information about the linux-mtd
mailing list