diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-10 19:41:34 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-13 10:35:12 -0700 |
commit | fcc7eb01914ffdec3b83ec4fb77f71fa08284a36 (patch) | |
tree | 1e40a19ffffb39aa8cf51dcc4a194f27a2a060a1 /include | |
parent | 7ce1166b0a3fb0969ba6164c610cc49b52f58f2f (diff) |
Mention atomic_o_trunc capability in description of open() handler.
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse_lowlevel.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index bad1d45..0f8c030 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -420,12 +420,18 @@ struct fuse_lowlevel_ops { /** * Open a file * - * Open flags (with the exception of O_CREAT, O_EXCL, O_NOCTTY and - * O_TRUNC) are available in fi->flags. - * - * Filesystem may store an arbitrary file handle (pointer, index, - * etc) in fi->fh, and use this in other all other file operations - * (read, write, flush, release, fsync). + * 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``. + * + * Filesystem may store an arbitrary file handle (pointer, + * index, etc) in fi->fh, and use this in other all other file + * operations (read, write, flush, release, fsync). * * Filesystem may also implement stateless file I/O and not store * anything in fi->fh. |