Skip to content
  • Rick Macklem's avatar
    nfscl: Send stateid.seqid of 0 for NFSv4.1/4.2 mounts · 7685f834
    Rick Macklem authored
    For NFSv4.1/4.2, the client may set the "seqid" field of the
    stateid to 0 in RPC requests.  This indicates to the server that
    it should not check the "seqid" or return NFSERR_OLDSTATEID if the
    "seqid" value is not up to date w.r.t. Open/Lock operations
    on the stateid.  This "seqid" is incremented by the NFSv4 server
    for each Open/OpenDowngrade/Lock/Locku operation done on the stateid.
    
    Since a failure return of NFSERR_OLDSTATEID is of no use to
    the client for I/O operations, it makes sense to set "seqid"
    to 0 for the stateid argument for I/O operations.
    This avoids server failure replies of NFSERR_OLDSTATEID,
    although I am not aware of any case where this failure occurs.
    
    This makes the FreeBSD NFSv4.1/4.2 client compatible with the
    Linux NFSv4.1/4.2 client.
    
    MFC after:	2 weeks
    7685f834