Linux has added "renameat()" and "renameat2()", which are supposed to be atomic if the system does not crash but are not guaranteed to recover cleanly. Some networked file systems (NFS, at least) can't do an atomic rename; if you lose the network connection during the switch you may be in an invalid state.
Comments
Linux has added "renameat()" and "renameat2()", which are supposed to be atomic if the system does not crash but are not guaranteed to recover cleanly. Some networked file systems (NFS, at least) can't do an atomic rename; if you lose the network connection during the switch you may be in an invalid state.