tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PUFFS direct I/O and page cache
Hi
FUSE supports per file descriptor I/O direct flag, which may be decided
by the filesystem (FUSE_FOPEN_DIRECT set in oflags in open's reply),
something we have trouble to deal with since we keep that flag at vnode
layer.
Here is a simple test where it breaks on glusterfs 3.6.0
rm -f test.txt
sync
sleep 3
jot -b a -s '' 10 >> test.txt
jot -b b -s '' 10 >> test.txt
cat test.txt
On first open of test.txt we write through the cache. On second open,
the fileysystem specify direct I/O, we bypass the cache. The correct
data is written to the filesystem, but if when we read with cat, the
second write's data (the "b") is replaced by nul characters readen from
the cache.
Here is a proposed fix, which invalidates the cache when we use direct
I/O: http://ftp.epsci.fr/shadow/manu/iodirect.patch
Opinions?
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index