Re: [AVFS] fuse+avfs problem with direct_io

Miklos Szeredi <[email protected]> Tue, 08 May 2007 10:01:57 +0200
Newsgroups gmane.comp.file-systems.avfs.user
Message-ID <[email protected]>
> An user recently reported a problem about accessing files using 
> avfs+fuse. For instance, cat'ing files with zero file length doesn't 
> output anything even if avfs would actually return some bytes. Extfs 
> handlers sometimes list files with zero file length but the files do 
> have a size > 0.
> 
> It looks like mounting avfs with the direct_io fuse option fixes this. I 
> don't know details about the kernel implementation but I assume that the 
> kernel doesn't issue a read operation if the file size is 0 bytes unless 
> direct io is enabled.
> 
> Miklos, is there any other solution for this problem or should we just 
> always enable direct_io in mountavfs? Are there some (performance?) 
> drawbacks?

The main drawback is that mmap() doesn't work with direct_io.  So I'm
not sure we should turn on direct_io by default.

It would be better if the filesystems which return a zero file size
could be fixed.  Or maybe treat files with zero size specially, and
open them with direct_io, while open all other files without
direct_io.  This is a bit hackish though.

Miklos

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/