e38f237e53
make sillyrename (try to) use LINK operation rather than RENAME. PR/33861 from Jed Davis. he provided the almost same patch. according to him, it also happen to be what opensolaris does in this case. from the PR: > In nfs_rename(), if the destination appears to exist and is "in use" > (this check is apparently satisfied even if the file isn't in use by > anything except the rename itself), it will sillyrename it, then delete > the sillyrenamed file even if the rename fails -- for instance, because > the "from" file no longer exists on the server. > mkdir a b; touch a/x; perl -e 'fork(); rename("a/x","b/x") or die "$!\n"' > > Afterwards, neither a/x nor b/x will exist. > 1) Lookup of b/x; fails with NOENT. > 2) Rename from a/x to b/x; succeeds. > 3) Lookup of b/x; fails with NOENT. > 4) Rename from b/x to b/.nfsA23a3; succeeds. > 5) Rename from a/x to b/x; fails with NOENT. > 6) Remove of b/.nfsA23a3; succeeds. |
||
---|---|---|
.. | ||
files.nfs | ||
krpc_subr.c | ||
krpc.h | ||
Makefile | ||
nfs_bio.c | ||
nfs_boot.c | ||
nfs_bootdhcp.c | ||
nfs_bootparam.c | ||
nfs_bootstatic.c | ||
nfs_export.c | ||
nfs_kq.c | ||
nfs_node.c | ||
nfs_nqlease.c | ||
nfs_serv.c | ||
nfs_socket.c | ||
nfs_srvcache.c | ||
nfs_subs.c | ||
nfs_syscalls.c | ||
nfs_var.h | ||
nfs_vfsops.c | ||
nfs_vnops.c | ||
nfs.h | ||
nfsdiskless.h | ||
nfsm_subs.h | ||
nfsmount.h | ||
nfsnode.h | ||
nfsproto.h | ||
nfsrtt.h | ||
nfsrvcache.h | ||
nqnfs.h | ||
rpcv2.h | ||
xdr_subs.h |