go-fuse icon indicating copy to clipboard operation
go-fuse copied to clipboard

Expose Readdir(Plus) cookies in the raw and FS API

Open hanwen opened this issue 1 year ago • 0 comments

See discussion on https://github.com/hanwen/go-fuse/pull/426

NFS(v4) has no opendir/closedir, so directory offsets must be universally valid, independent of open/close.

This means that fs.Inode.listChildren must become more clever. For FSess that provide their own readdir, the API should support passing in and returning Offset field in the Dirent (which are understood to be opaque int64 cookies rather than linear offsets.)

For fuse.RawFileSystem and fuse.DirEntryList we can probably bolt on support for Offset in a backward compatible manner. For fs, we have to reconsider how Opendir/Readdir interact. This is also necessary to support FOPEN_CACHE_DIR properly.

hanwen avatar Apr 14 '23 08:04 hanwen