Storage glossary · JSON corpus · llms.txt · hesela.com

atomic-rename · shipping · also atomic file replacement, rename atomicity

Atomic rename

Atomic rename is a filesystem namespace operation whose successful replacement of an existing destination changes the file reached through that pathname without exposing an intermediate missing destination to concurrent lookups.

For Linux rename(), source and destination must be on the same mounted filesystem; even separate mount points of one filesystem produce EXDEV. Existing descriptors retain their original file references, and other hard links are unaffected. Both pathnames may temporarily refer to the source, so the guarantee is not a two-path snapshot. Success establishes visibility, not crash durability: the file-data and directory-persistence requirements must be handled separately.

Relations

related
directory-fsync, open-file-description, inode, hard-link, unlink, crash-consistency

Advantages

Limitations

Citations

  1. Linux man-pages 6.19: rename(2) (accessed 2026-10-15)
  2. Linux man-pages 6.19: open(2) (accessed 2026-10-15)
  3. Linux man-pages 6.19: fsync(2) (accessed 2026-10-15)
  4. Hesela: The name changes; existing readers do not (accessed 2026-10-15)
  5. RFC 8881: NFSv4.1 replay and persistence, sections 2.10.6 and 2.10.6.5 (accessed 2026-10-15)

JSON: /data/terms/atomic-rename.json