Expand description
NFS version 4.0 – RFC 7530.
NFSv4 is a different shape from v2 and v3. Rather than one RPC per
operation, the client batches operations into a single COMPOUND call that
the server executes in order against a “current file handle” the operations
mutate as they go, so PUTROOTFH; LOOKUP "etc"; GETFH is one round trip.
MOUNT is gone: the server exports a single pseudo-filesystem tree reached
from PUTROOTFH.
§Scope
Both stateless operations (LOOKUP, GETATTR, READDIR, anonymous READ) and
stateful operations (SETCLIENTID, OPEN, CLOSE, stateid-bearing READ/WRITE,
RENEW) are implemented for NFSv4.0. The session module tracks the
(clientid, verifier) pair negotiated via SETCLIENTID + SETCLIENTID_CONFIRM,
and the state module tracks per-file open and lock stateids.
The v4.1 session machinery of RFC 8881 (CREATE_SESSION, SEQUENCE, DESTROY_SESSION) is not yet implemented.
Re-exports§
pub use client::Nfs4Client;pub use client::Nfs4Error;pub use session::Nfs4Session;pub use state::LockRange;pub use state::LockState;pub use state::OpenState;pub use wire::NfsImplId4;pub use wire::ArgOp;pub use wire::AttrRequest;pub use wire::CompoundArgs;pub use wire::CompoundBuilder;pub use wire::CompoundRes;pub use wire::DirEntry4;pub use wire::Fattr4Decoded;pub use wire::NFS4_PROC_COMPOUND;pub use wire::NFS4_PROGRAM as PROGRAM;pub use wire::NFS4_VERSION as VERSION;pub use wire::Nfs4DirEntry;pub use wire::Nfs4FileInfo;pub use wire::Nfs4FileType;pub use wire::Nfs4Status;pub use wire::ResOp;pub use wire::ResOpData;pub use wire::SecInfoEntry;pub use wire::FATTR4_SEC_LABEL;pub use wire::SecLabel4;pub use wire::CreateMode4;pub use wire::LockType4;pub use wire::NFS4_FHSIZE;pub use wire::NFS4_OPAQUE_LIMIT;pub use wire::NFS4_OTHER_SIZE;pub use wire::NFS4_VERIFIER_SIZE;pub use wire::OpenClaimType4;pub use wire::OpenDelegationType4;pub use wire::OpenType4;pub use wire::StableHow4;pub use wire::ChangeInfo4;pub use wire::LockOwner4;pub use wire::NfsAce4;pub use wire::NfsFtype4;pub use wire::OpenOwner4;pub use wire::Stateid4;pub use wire::CreateType4;pub use wire::Fattr4;pub use wire::Locker4;pub use wire::OpenClaim4;pub use wire::OpenFlag4;pub use wire::OpenDelegation4;pub use wire::SpaceLimit4;
Modules§
- client
- NFSv4 COMPOUND client – generic over
RpcTransport. - session
- NFSv4.0 session state – client identity, lease tracking, open-owner sequencing.
- state
- Per-file open and lock state tracking.
- wire
- NFSv4 XDR types – RFC 7530.