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. |
||
---|---|---|
bin | ||
common | ||
crypto | ||
dist | ||
distrib | ||
doc | ||
etc | ||
games | ||
gnu | ||
include | ||
lib | ||
libexec | ||
regress | ||
rescue | ||
sbin | ||
share | ||
sys | ||
tools | ||
usr.bin | ||
usr.sbin | ||
x11 | ||
build.sh | ||
BUILDING | ||
Makefile | ||
Makefile.inc | ||
UPDATING |