Document when `fuse_lowlevel_notify_*` functions may block.
authorNikolaus Rath <Nikolaus@rath.org>
Tue, 6 Nov 2018 18:41:58 +0000 (18:41 +0000)
committerNikolaus Rath <Nikolaus@rath.org>
Tue, 6 Nov 2018 18:50:07 +0000 (18:50 +0000)
ChangeLog.rst
include/fuse_lowlevel.h

index 24b4d9c9d456e926945e19392024da4af8c40f52..0b6ce98a3d28390d46bdb6770c9a0d6c7e85b9e9 100644 (file)
@@ -17,6 +17,9 @@ Unreleased Changes
   filesystem fully unprivileged and unable to re-acquire privilege via setuid,
   fscaps, etc.
 
+* Documented under which conditions the `fuse_lowlevel_notify_*`
+  functions may block.
+
 libfuse 3.2.6 (2018-08-31)
 ==========================
 
index 7ae8c1e68263714364baa2fb294d16535f43c948..395c0d9a673faf52ae91de58b9b4b183e9270be5 100644 (file)
@@ -1531,6 +1531,15 @@ int fuse_lowlevel_notify_poll(struct fuse_pollhandle *ph);
  * this (or a newer) version, the function will return -ENOSYS and do
  * nothing.
  *
+ * If the filesystem has writeback caching enabled, invalidating an
+ * inode will first trigger a writeback of all dirty pages. The call
+ * will block until all writeback requests have completed and the
+ * inode has been invalidated. It will, however, not wait for
+ * completion of pending writeback requests that have been issued
+ * before.
+ *
+ * If there are no dirty pages, this function will never block.
+ *
  * @param se the session object
  * @param ino the inode number
  * @param off the offset in the inode where to start invalidating
@@ -1554,6 +1563,8 @@ int fuse_lowlevel_notify_inval_inode(struct fuse_session *se, fuse_ino_t ino,
  * removexattr(), readdir() or readdirplus() request for the inode
  * itself.
  *
+ * When called correctly, this function will never block.
+ *
  * Added in FUSE protocol version 7.12. If the kernel does not support
  * this (or a newer) version, the function will return -ENOSYS and do
  * nothing.
@@ -1582,6 +1593,8 @@ int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent,
  * description of fuse_lowlevel_notify_inval_entry() for more
  * details).
  *
+ * When called correctly, this function will never block.
+ *
  * Added in FUSE protocol version 7.18. If the kernel does not support
  * this (or a newer) version, the function will return -ENOSYS and do
  * nothing.