open(): fix documentation of O_TRUNC flag
authorNikolaus Rath <Nikolaus@rath.org>
Wed, 15 Mar 2017 23:44:35 +0000 (16:44 -0700)
committerNikolaus Rath <Nikolaus@rath.org>
Wed, 15 Mar 2017 23:48:27 +0000 (16:48 -0700)
The FUSE_CAP_ATOMIC_IO_TRUNC capability is enabled by default,
but we didn't update the open() documentation accordingly.

include/fuse_common.h
include/fuse_lowlevel.h

index 7c2e86f5a933073196278f297dbee56706469bdd..bb73d9f8e6e6214c7b3773dc4d3df70027410ecf 100644 (file)
@@ -106,7 +106,9 @@ struct fuse_file_info {
 #define FUSE_CAP_POSIX_LOCKS           (1 << 1)
 
 /**
- * Indicates that the filesystem supports  the O_TRUNC open flag
+ * Indicates that the filesystem supports the O_TRUNC open flag.  If
+ * disabled, and an application specifies O_TRUNC, fuse first calls
+ * truncate() and then open() with O_TRUNC filtered out.
  *
  * This feature is enabled by default when supported by the kernel.
  */
index 835b4208fb68a031c1089f013fade933c671393a..987b24d984e7dfb1ff11a42076ea802357f04f0f 100644 (file)
@@ -439,14 +439,8 @@ struct fuse_lowlevel_ops {
        /**
         * Open a file
         *
-        * Open flags are available in fi->flags.  Creation (O_CREAT,
-        * O_EXCL, O_NOCTTY) and by default also truncation (O_TRUNC)
-        * flags will be filtered out. If an application specifies
-        * O_TRUNC, fuse first calls truncate() and then open().
-        *
-        * If filesystem is able to handle O_TRUNC directly, the
-        * init() handler should set the `FUSE_CAP_ATOMIC_O_TRUNC` bit
-        * in ``conn->want``.
+        * Open flags are available in fi->flags. Creation (O_CREAT,
+        * O_EXCL, O_NOCTTY) flags will be filtered out. 
         *
         * Filesystem may store an arbitrary file handle (pointer,
         * index, etc) in fi->fh, and use this in other all other file