• Chuck Lever's avatar
    NFSD: Add simple u32, u64, and bool encoders · 6cc58291
    Chuck Lever authored
    The generic XDR encoders return a length or a negative errno. NFSv4
    encoders want to know simply whether the encode ran out of stream
    buffer space. The return values for server-side encoding are either
    nfs_ok or nfserr_resource.
    
    So far I've found it adds a lot of duplicate code to try to use the
    generic XDR encoder utilities when encoding the simple data types in
    the NFSv4 operation encoders.
    
    Add a set of NFSv4-specific utilities that handle the basic XDR data
    types. These are added in xdr4.h so they might eventually be used by
    the callback server and pNFS driver encoders too.
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    6cc58291
xdr4.h 28.5 KB