aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.rst3
-rw-r--r--include/fuse_common.h5
-rw-r--r--lib/fuse_lowlevel.c3
3 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst
index 4fbce46..864642a 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,6 +1,9 @@
Unreleased Changes
==================
+* Fixed description of the `fuse_conn_info->time_gran`. The default
+ value of zero actually corresponds to full nanosecond resolution,
+ not one second resolution.
* The init script is now installed into the right location
($DESTDIR/etc/init.d rather than $prefix/$sysconfdir/init.d)
* The `example/passthrough_ll` filesystem now supports creating
diff --git a/include/fuse_common.h b/include/fuse_common.h
index 6bb14f3..8bacec5 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -406,8 +406,9 @@ struct fuse_conn_info {
*
* 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).
+ * The value should be power of 10. The default is 1, i.e. full
+ * nano-second resolution. Filesystems supporting only second resolution
+ * should set this to 1000000000.
*/
unsigned time_gran;
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index c1c573f..ccdb5a5 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -1919,7 +1919,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
LL_SET_DEFAULT(se->op.flock, FUSE_CAP_FLOCK_LOCKS);
LL_SET_DEFAULT(se->op.readdirplus, FUSE_CAP_READDIRPLUS);
LL_SET_DEFAULT(se->op.readdirplus, FUSE_CAP_READDIRPLUS_AUTO);
-
+ se->conn.time_gran = 1;
+
if (bufsize < FUSE_MIN_READ_BUFFER) {
fprintf(stderr, "fuse: warning: buffer size too small: %zu\n",
bufsize);