Re:NFS > FUSE: Why We Built Our Own NFS Server in Rust
by EdSchouten on Tuesday September 19, 2023 @04:11PM
(#37575832)
Look at RFC 7531. XDR definitions for NFSv4 exists, and they can also be used to generate C bindings if you want.
[ Parent
| on HN ]
Re:NFS > FUSE: Why We Built Our Own NFS Server in Rust
by mprovost on Tuesday September 19, 2023 @05:19PM
(#37576875)
Sure, running it through rpcgen generates bindings for both RPCs, NULL and COMPOUND:
/// /*
/// * Remote file service routines
/// */
/// program NFS4_PROGRAM {
/// version NFS_V4 {
/// void
/// NFSPROC4_NULL(void) = 0;
///
/// COMPOUND4res
/// NFSPROC4_COMPOUND(COMPOUND4args) = 1;
///
/// } = 4;
/// } = 100003;
Re:NFS > FUSE: Why We Built Our Own NFS Server in Rust
by EdSchouten on Tuesday September 19, 2023 @10:42PM
(#37579846)
Which is also what you want, right? The issue is that with compound calls there is some state that’s carried over between operations (current/saved file handle), so you’d need to implement that yourself anyway.
Re:NFS > FUSE: Why We Built Our Own NFS Server in Rust
by mprovost on Wednesday September 20, 2023 @02:38AM
(#37581105)
Well yeah that's the difference, it doesn't generate the state machine for you so you "just" need to implement it yourself. For v3, rpcgen spits out a working function that you link into your program and you're done (on the client side anyway). Much easier.