Re: O_DIRECT for FAT

2007-05-17 Thread Hubertus Grobbel
Hi Alan, Erik and Hirofumi and the rest, I want to inform you of my success. So first of all thanks for your help! Assuring, that the buffer is aligned according 4k (pagesize = getpagesize() and multiple of sectorsize = blockdev --getss) using memalign or posix_memalign, did the job. Thanks a

Re: O_DIRECT for FAT

2007-05-15 Thread Erik Mouw
On Tue, May 15, 2007 at 01:02:51AM +0100, Hubertus Grobbel wrote: > I found out, that the option O_DIRECT for opening a file on a fat- > filesystem successfully completes. But reading and writing to that > file leads to EINVAL errors (using kernel 2.6.18). Make sure your buffer is page aligned and

Re: O_DIRECT for FAT

2007-05-14 Thread OGAWA Hirofumi
Hubertus Grobbel <[EMAIL PROTECTED]> writes: > I found out, that the option O_DIRECT for opening a file on a fat- > filesystem successfully completes. But reading and writing to that > file leads to EINVAL errors (using kernel 2.6.18). EINVAL may be meaning the memory alignment which you passed t

Re: O_DIRECT for FAT

2007-05-14 Thread Alan Cox
> I would like to access on certain files on a flash-disk without cache > usage, whereas the rest of the filesystem shall be accessed normally/cached. > I am aware of the previous discussion. My application is not targetting on a > pure file usage (I can live with the existing features for that),

O_DIRECT for FAT

2007-05-14 Thread Hubertus Grobbel
Hi, I found out, that the option O_DIRECT for opening a file on a fat- filesystem successfully completes. But reading and writing to that file leads to EINVAL errors (using kernel 2.6.18). I would like to access on certain files on a flash-disk without cache usage, whereas the rest of the filesys