|
|
|
|
|
by cyphar
2 days ago
|
|
There are userspace nfsd implementations, Ganesha is probably the most fully-featured one these days and it works on several *nix systems. File handles (unique identifiers for inodes that can be used to reopen a file later) have been exposed to userspace for a long time with name_to_handle_at(2) and open_by_handle_at(2) -- these were originally exposed precisely for userspace nfsd. The topic of i_version semantics has been discussed recently[1,2]. The kernel's nfsd lies about filesystems that don't support i_version so it's not a hard requirement for a replacement, and as the articles I linked note you can retrieve i_generation via ioctl(FS_IOC_GETVERSION). And it's important to note that most (if not all) of these are related to optimisations. [1]: https://lwn.net/Articles/905931/
[2]: https://lwn.net/Articles/937247/ |
|
I was using Ganesha at work because FUSE on macOS had been deprecated, and we were trying to serve the filesystem locally via NFS. We emulated filehandles with an LRU cache.