Sherlock-Holo / fuse3

an async version fuse library for rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fuse3 wrongly assumes sequential directory offsets in handle_readdir

asomers opened this issue · comments

The FUSE protocol allows each directory entry to include a off field in struct fuse_dirent. It's purpose is to uniquely identify a directory entry so that a future FUSE_READDIR operation may continue where a previous one left off. The FUSE file system is allowed to choose the format of those off values. In particular, sequentially increasing indexes are usually not adequate, because if a directory entry is deleted in between two FUSE_READDIR operations, using sequential off values could lead to skipping over a directory entry.
fuse3 currently manages the off value itself, in handle_readdir, and provides the file system with no means to override it. Instead, the off value should be specified by the file system as part of reply::DirectoryEntry.