Clarify *_timeout semantics
authorNikolaus Rath <Nikolaus@rath.org>
Thu, 8 Jun 2017 17:32:46 +0000 (13:32 -0400)
committerNikolaus Rath <Nikolaus@rath.org>
Thu, 8 Jun 2017 17:32:46 +0000 (13:32 -0400)
When changes always come through kernel, timeouts
should be large.

include/fuse_common.h
include/fuse_lowlevel.h

index bb73d9f8e6e6214c7b3773dc4d3df70027410ecf..6bb14f37243a566ad222703629b42d40ce57ff24 100644 (file)
@@ -189,8 +189,8 @@ struct fuse_file_info {
  * cached file *contents* will be invalidated as well.
  *
  * This flag should always be set when available. If all file changes
- * go through the kernel, *attr_timeout* should be set to zero to
- * avoid unneccessary getattr() calls.
+ * go through the kernel, *attr_timeout* should be set to a very large
+ * number to avoid unneccessary getattr() calls.
  *
  * This feature is enabled by default when supported by the kernel.
  */
index 8d93766c44c2aac1a8a6c0ff206725bcd085f74e..b9acc7e8bafa613705b8a53f25997500e2abe0b9 100644 (file)
@@ -90,10 +90,16 @@ struct fuse_entry_param {
         */
        struct stat attr;
 
-       /** Validity timeout (in seconds) for the attributes */
+       /** Validity timeout (in seconds) for inode attributes. If
+           attributes only change as a result of requests that come
+           through the kernel, this should be set to a very large
+           value. */
        double attr_timeout;
 
-       /** Validity timeout (in seconds) for the name */
+       /** Validity timeout (in seconds) for the name. If directory
+           entries are changed/deleted only as a result of requests
+           that come through the kernel, this should be set to a very
+           large value. */
        double entry_timeout;
 };