On Aug 17, 2007, at 1:02 PM, Murali Vilayannur wrote:

Hi John,

Using direct_io avoids the page cache.  Basicaly, direct_io calls
back almost immediately into the user space code rather than going
through the generic_file_read/write path.  What that also means is
that some attrs may not get updated properly if they are getting
cached in the kernel.

I did not think that using O_DIRECT causes coherence issues in the VFS caches.
that would be disastrous for databases that rely on O_DIRECT, no?
What attrs don't get updated?

Actually, I'm talking about using the direct_io option in Fuse not the O_DIRECT option. When you use direct_io, Fuse skips the kernel entirely and lets the user space code handle everything. On MacFUSE which is what I was using the most, the attributes dont get invalidated all the time. So, if you did a write that changed the size of the file and then did a getattr, the old size would be returned from the kernel's cached attributes. I had to submit a patch to MacFUSE to get it partly fixed.

I assumed the same problem existed with Linux, but I just checked and the Linux Fuse kernel implementation invalidates all the attributes whenever you do a read or write, so I guess its not a problem.

John.

_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to