aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog.rst
diff options
context:
space:
mode:
authorGravatar Rostislav <rostislav@users.noreply.github.com>2018-07-21 12:57:09 +0300
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2018-07-21 10:57:09 +0100
commit5f125c5e6be24c8d216a4d3c623dc73d742c8c86 (patch)
treedc98c1f6db3695d6cf46276f0674bff243fd646e /ChangeLog.rst
parent795ad5d77434f3502e63a70c8a3fda94fa347e3d (diff)
Fix readdir() bug when a non-zero offset is specified in filler (#269)
The bug occurs when a filesystem client reads a directory until the end, seeks using seekdir() to some valid non-zero position and calls readdir(). A valid 'struct dirent *' is expected, but NULL is returned instead. Pseudocode demonstrating the bug: DIR *dp = opendir("some_dir"); struct dirent *de = readdir(dp); /* Get offset of the second entry */ long offset = telldir(dp); /* Read directory until the end */ while (de) de = readdir(de); seekdir(dp, offset); de = readdir(dp); /* de must contain the second entry, but NULL is returned instead */ The reason of the bug is that when the end of directory is reached, the kernel calls FUSE_READDIR op with an offset at the end of directory, so the filesystem's .readdir callback never calls the filler function, and we end up with dh->filled set to 1. After seekdir(), FUSE_READDIR is called again with a new offset, but this time the filesystem's .readdir callback is never called, and an empty reply is returned. Fix by setting dh->filled to 1 only when zero offsets are given to filler function.
Diffstat (limited to 'ChangeLog.rst')
-rw-r--r--ChangeLog.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst
index cf5450e..9ba0263 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,3 +1,11 @@
+libfuse 3.2.5
+==========================
+
+* Added a test of `seekdir` to test_syscalls.
+* Fixed `readdir` bug when non-zero offsets are given to filler and the
+ filesystem client, after reading a whole directory, re-reads it from a
+ non-zero offset e. g. by calling `seekdir` followed by `readdir`.
+
libfuse 3.2.4 (2018-07-11)
==========================