cberner / fuser

Filesystem in Userspace (FUSE) for Rust
MIT License
775 stars 109 forks source link

What are the ttl and generation arguments for in the replies? #292

Open sbstp opened 1 month ago

sbstp commented 1 month ago

I can't seem to find documentation in this repo, on Google, or in the libfuse docs about what these arguments do.

sbstp commented 1 month ago

I did more digging in the code and ended up landing on this page https://man7.org/linux/man-pages/man4/fuse.4.html (Fuse ABI).

If someone ends up here in the future, TTL is related to getattr caching (see above)

For performance reasons, these attributes may be cached in the kernel for a specified duration of time. While the cache timeout has not been exceeded, the attributes will be served from the cache and will not cause additional FUSE_GETATTR requests.

For generation it says

The combination of nodeid and generation must be unique for the filesystem's lifetime.

My understanding is that this is used to differentiate inodes if the filesystem is remounted.