Improve documentation of fuse_conn_info.time_gran.
authorNikolaus Rath <Nikolaus@rath.org>
Thu, 10 Nov 2016 22:04:51 +0000 (14:04 -0800)
committerNikolaus Rath <Nikolaus@rath.org>
Thu, 10 Nov 2016 22:04:51 +0000 (14:04 -0800)
Fixes #97.

include/fuse_common.h

index 44b0634a8659adf8aea4b0555c6e803cb21845b3..2ba388857498560cbbba2211a20590bc54f3a590 100644 (file)
@@ -259,15 +259,24 @@ struct fuse_conn_info {
        unsigned max_background;
 
        /**
+
         * Kernel congestion threshold parameter
         */
        unsigned congestion_threshold;
 
        /**
-        * Time granularity if kernel is responsible for setting times (in nsec)
+        * When FUSE_CAP_WRITEBACK_CACHE is enabled, the kernel is responsible
+        * for updating mtime and ctime when write requests are received. The
+        * updated values are passed to the filesystem with setattr() requests.
+        * However, if the filesystem does not support the full resolution of
+        * the kernel timestamps (nanoseconds), the mtime and ctime values used
+        * by kernel and filesystem will differ (and result in an apparent
+        * change of times after a cache flush).
         *
-        * Should be power of 10.  A zero (default) value is equivalent to
-        * 1000000000 (1sec).
+        * To prevent this problem, this variable can be used to inform the
+        * kernel about the timestamp granularity supported by the file-system.
+        * The value should be power of 10.  A zero (default) value is
+        * equivalent to 1000000000 (1sec).
         */
        unsigned time_gran;