{
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-17",
  "slug": "rename-exchange",
  "term": "RENAME_EXCHANGE",
  "aliases": [],
  "definition": "RENAME_EXCHANGE is a Linux renameat2 flag that atomically swaps two existing pathname bindings.",
  "note": "Both names must exist; this flag cannot be combined with RENAME_NOREPLACE. [rename]\n\nHesela 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. [observation]",
  "related": [
    "atomic-rename",
    "rename-noreplace",
    "open-file-description",
    "directory-fsync"
  ],
  "citations": [
    {
      "id": "rename",
      "title": "Linux man-pages: rename(2), renameat2 flags",
      "url": "https://man7.org/linux/man-pages/man2/rename.2.html",
      "accessed": "2026-10-17"
    },
    {
      "id": "observation",
      "title": "Hesela: exchange observation and limitations",
      "url": "https://hesela.com/analyses/tmpfile-publication-rename-contracts/#observation",
      "accessed": "2026-10-17"
    }
  ]
}
