{
  "slug": "o-rsync",
  "term": "O_RSYNC",
  "aliases": [],
  "definition": "O_RSYNC is a POSIX open-file flag that extends the O_DSYNC or O_SYNC integrity-completion requirement to read operations.",
  "note": "POSIX.1-2024 pairs O_RSYNC with O_DSYNC for data-integrity completion or with O_SYNC for file-integrity completion. These are synchronized-read requirements, not merely a promise that read() blocks until it returns. [posix-open] [posix-read]\n\nFor data-integrity completion, pending writes affecting the requested data at the time of the read request must complete successfully before that data is read. File-integrity completion additionally covers the file attributes associated with the operation. This does not specify a transaction or snapshot across later concurrent updates. [posix-definitions]\n\nLinux man-pages 6.19 documents O_SYNC and O_DSYNC but states that Linux does not implement O_RSYNC. The generic glibc 2.39 Linux header aliases O_RSYNC to O_SYNC unless an architecture-specific __O_RSYNC is defined. A defined macro, successful open, or matching F_GETFL bit therefore does not establish POSIX synchronized-read support. Do not use an O_RSYNC-labelled Linux read as evidence that pending writes reached durable storage. [linux-open] [glibc-flags]",
  "status": "limited",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-22",
  "advantages": [],
  "limitations": [
    "The POSIX flag name and an implementation's supported completion semantics must be checked separately.",
    "Synchronized completion is not an independent comparison against expected file contents."
  ],
  "related": [
    "o-dsync",
    "o-sync",
    "fdatasync",
    "fsync",
    "open-file-description",
    "data-durability"
  ],
  "citations": [
    {
      "id": "posix-open",
      "title": "POSIX.1-2024: open(), O_RSYNC and synchronized I/O flags",
      "url": "https://pubs.opengroup.org/onlinepubs/9799919799/functions/open.html",
      "accessed": "2026-11-22"
    },
    {
      "id": "posix-read",
      "title": "POSIX.1-2024: read(), O_RSYNC with O_DSYNC or O_SYNC",
      "url": "https://pubs.opengroup.org/onlinepubs/9799919799/functions/read.html",
      "accessed": "2026-11-22"
    },
    {
      "id": "posix-definitions",
      "title": "POSIX.1-2024: definitions 3.368-3.371, integrity completion and synchronous I/O",
      "url": "https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap03.html#tag_03_368",
      "accessed": "2026-11-22"
    },
    {
      "id": "linux-open",
      "title": "Linux man-pages 6.19: open(2), synchronized I/O and the unimplemented O_RSYNC flag",
      "url": "https://man7.org/linux/man-pages/man2/open.2.html",
      "accessed": "2026-11-22"
    },
    {
      "id": "glibc-flags",
      "title": "glibc 2.39: Linux fcntl header, conditional O_RSYNC alias",
      "url": "https://github.com/bminor/glibc/blob/glibc-2.39/sysdeps/unix/sysv/linux/bits/fcntl-linux.h",
      "accessed": "2026-11-22"
    }
  ],
  "provenance": [
    "Status reflects implementation-dependent availability: a POSIX specification does not establish Linux support.",
    "Source review of POSIX.1-2024, Linux man-pages 6.19 and the glibc 2.39 header; no device-fault injection, power-loss test or performance measurement."
  ]
}
