{
  "slug": "open-file-description",
  "term": "Open file description",
  "aliases": [
    "OFD"
  ],
  "definition": "An open file description is a system-wide open-file object referenced by one or more file descriptors and holding state such as the current file offset and file status flags.",
  "note": "On Linux, each successful open creates a new open file description; dup and descriptors inherited through fork refer to the existing object. In the generic writeback-error path, that object's f_wb_err cursor is shared by its aliases. This source-code relationship explains why two descriptor numbers need not provide independent error observations.",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    "File descriptor flags, such as close-on-exec, are not shared state of the open file description.",
    "Sharing an offset or error cursor does not establish persistence or application-level recovery."
  ],
  "related": [
    "fsync",
    "writeback-error",
    "errseq-t"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-13",
  "citations": [
    {
      "id": "open-api",
      "title": "Linux man-pages 6.19: open(2), open file descriptions",
      "url": "https://man7.org/linux/man-pages/man2/open.2.html",
      "accessed": "2026-10-13"
    },
    {
      "id": "dup-api",
      "title": "Linux man-pages 6.19: dup(2), shared open file descriptions",
      "url": "https://man7.org/linux/man-pages/man2/dup.2.html",
      "accessed": "2026-10-13"
    },
    {
      "id": "filemap-source",
      "title": "Linux v6.12: file_check_and_advance_wb_err in mm/filemap.c",
      "url": "https://github.com/torvalds/linux/blob/v6.12/mm/filemap.c",
      "accessed": "2026-10-13"
    },
    {
      "id": "hesela-fsync",
      "title": "Hesela: Two descriptors are not necessarily two error observers",
      "url": "https://hesela.com/analyses/fsync-failure-retry-durability/#descriptor-sharing",
      "accessed": "2026-10-13"
    }
  ]
}
