34f2db4676
server-side RPC retranmission cache for non-idempotent operations: these hacks substituted 0 (success) for the expected EEXIST in the event that a target name already existed for LINK, SYMLINK, and MKDIR operations, under the assumption that EEXIST represented a second application of the original RPC rather than a true failure. Background: certain NFS operations (in this case, LINK, SYMLINK, and MKDIR) are not idempotent, as they leave behind persisting state on the server that prevents them from being replayed without an error;if an UDP RPC reply is lost leading to a retransmission by theclient, the second reply will return EEXIST rather than success, asthe new object has already been created. The NFS client previouslysilently mapped the EEXIST return into success to paper over thisproblem. However, in all modern NFS server implementations, a reply cache is kept in order to retransmit the original reply to a retransmitted request, rather than performing the operation a second time, allowing this hack to be avoided. This allows link()-based filelocking over NFS to operate correctly, as an application requestingthe creation of a new link for a file to tell if it succeededatomically or not. Other NFS clients, including Solaris and Linux, generally follow this behavior for the same reasons. Most clients also now default to TCP, which also helps avoid the issue of retransmitted but non-idempotent requests in most cases. Reported by: Adam McDougall <mcdouga9 at egr dot msu dot edu>, Timo Sirainen <tss at iki dot fi> Reviewed by: mohans MFC after: 1 week |
||
---|---|---|
.. | ||
bootp_subr.c | ||
krpc_subr.c | ||
krpc.h | ||
nfs_bio.c | ||
nfs_diskless.c | ||
nfs_lock.c | ||
nfs_lock.h | ||
nfs_nfsiod.c | ||
nfs_node.c | ||
nfs_socket.c | ||
nfs_subs.c | ||
nfs_vfsops.c | ||
nfs_vnops.c | ||
nfs.h | ||
nfsargs.h | ||
nfsdiskless.h | ||
nfsm_subs.h | ||
nfsmount.h | ||
nfsnode.h | ||
nfsstats.h | ||
nlminfo.h |