rkctechnocrat / macfuse

Automatically exported from code.google.com/p/macfuse
Other
0 stars 0 forks source link

attributes cache is not invalidated on a write with direct_io #219

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Mount a FUSE filesystem such as fusexmp with the -o direct_io option
2. Run "iozone -a" and it will fail

Iozone does a bunch of writes and then does lseeks from the end of the file.  
These fail because 
the cached attribute size is still 0.

The following patch seems to fix the problem.

--- ../macfuse_0.3.0/fusefs/fuse_vnops.c        2007-06-12 05:55:21.000000000 
-0400
+++ ../macfuse_0.3.0/fusefs/fuse_vnops.c.orig   2007-06-01 09:29:41.000000000 
-0400
@@ -3301,8 +3301,6 @@
             uio_setoffset(uio, (uio_offset(uio) - diff));
         } /* while */

-        fuse_invalidate_attr(vp);
-
         fuse_ticket_drop(fdi.tick);

         return error;

Original issue reported on code.google.com by jchan...@gmail.com on 12 Jun 2007 at 10:36

GoogleCodeExporter commented 8 years ago

Original comment by si...@gmail.com on 12 Jun 2007 at 2:13