RENAME_EXCHANGE
RENAME_EXCHANGE is a Linux renameat2 flag that atomically swaps two existing pathname bindings.
Both names must exist; this flag cannot be combined with RENAME_NOREPLACE. [1]
Hesela observed swapped inode identities at the names while existing descriptors still read their original payloads. The experiment was sequential: it does not prove concurrent atomicity or crash durability, and two reader lookups do not become a snapshot. [2]
Relations
- related
- atomic-rename, rename-noreplace, open-file-description, directory-fsync