mmap on jffs2

Carlos Manuel Duclos Vergara carlos at embedded.cl
Wed Jul 21 08:52:02 EDT 2004


El Miércoles, 21 de Julio de 2004 20:23, dibacco at inwind.it escribió:
> Hi,
>

Hi,

> I have a problem mapping a file opened with flag O_RDWR. This file is
> housed on a jffs2 file system that currently lives on simple ram. Could you
> give me an hint where to search for a possible solution? If I open the file
> in O_RDONLY mode the mapping is done, instead with O_RDWR mmap returns
> -EINVAL.
>

i'm not sure, but it could be because of the 'j' (Journaling). A journaling 
filesystem is different from another kind of filesystem, and i'm not sure 
about what it could mean mmap for a file in a journal filesystem.
A journal filesystem uses two stages for writing, the journal and the real 
data. So when you try to mmap a file for writing in  a journal filesystem it 
can be very tricky to implement, but for reading there is no problem because 
when you read a file you get the file from the data, not from the journal.

My $1

-- 
Carlos Manuel Duclos Vergara
carlos at embedded.cl




More information about the linux-mtd mailing list