{
  "slug": "soft-updates",
  "term": "Soft updates",
  "aliases": [
    "softdep"
  ],
  "definition": "Soft updates is a filesystem metadata-consistency mechanism that delays unsafe on-disk changes until their update dependencies are satisfied.",
  "note": "The original BSD implementation uses per-change tracking and temporary buffer rollback rather than a full metadata journal. [soft1999] FreeBSD also offers soft updates journaling as a separate setting. [tunefs143]\n\nIn the 4.4BSD implementation, aggregating operations that were previously done one at a time and synchronously cut disk writes by 40 to 70% in file-intensive workloads, with performance within a few percent of optimal. Once per second the syncer daemon processes the task list of dependency work that has become safe. [soft1999]\n\nDeferred removal has visible side effects. Correct ordering of a removed directory's '..' entry introduced a delay of up to two minutes before deallocation, so an in-memory effective link count was added for calls such as rmdir. A crash during bulk tree removal can leave tens to hundreds of unreferenced inodes, which fsck clears instead of moving them to lost+found. [soft1999]\n\nThe FreeBSD 14.3 manual describes journal-based crash cleanup as usually taking seconds and no more than a minute, at the cost of extra log writes. That statement concerns journal recovery, not a bound on total service restoration or a full filesystem check. The manual separately calls for full checks periodically or after a filesystem panic because journal recovery cannot fix unrecorded media errors. [tunefs143]",
  "status": "shipping",
  "advantages": [
    {
      "text": "The filesystem can be used immediately after a crash, and leftover unclaimed blocks and inodes are reclaimed later in the background.",
      "citationIds": [
        "soft1999"
      ]
    }
  ],
  "limitations": [
    {
      "text": "It does not make every recent application write durable, and unused allocations can require later reclamation.",
      "citationIds": [
        "soft1999"
      ]
    },
    {
      "text": "Dependency structures consume kernel memory, so the implementation has to bound their total size.",
      "citationIds": [
        "soft1999"
      ]
    }
  ],
  "related": [
    "metadata-update-dependency",
    "background-fsck",
    "crash-consistency",
    "patchgroup",
    "backpointer-based-consistency",
    "squirrelfs"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "soft1999",
      "title": "McKusick and Ganger. Soft Updates: A Technique for Eliminating Most Synchronous Writes in the Fast Filesystem. FREENIX 1999, pp. 1-17, sections 2-4.",
      "url": "https://www.usenix.org/legacy/publications/library/proceedings/usenix99/full_papers/mckusick/mckusick.pdf",
      "accessed": "2026-10-22"
    },
    {
      "id": "hesela-soft",
      "title": "Hesela: Soft updates and metadata ordering",
      "url": "https://hesela.com/analyses/soft-updates-metadata-ordering/",
      "accessed": "2026-10-15"
    },
    {
      "id": "tunefs143",
      "title": "FreeBSD 14.3-RELEASE tunefs(8): distinct soft updates and soft updates journaling settings.",
      "url": "https://man.freebsd.org/cgi/man.cgi?query=tunefs&sektion=8&manpath=FreeBSD+14.3-RELEASE",
      "accessed": "2026-10-25"
    }
  ],
  "updated": "2026-11-16",
  "provenance": [
    "soft1999 is the FREENIX 1999 paper by McKusick and Ganger, reread on the access date in the abstract, section 3 and the parts on fsync, link counts, memory use and fsck.",
    "tunefs143 is the FreeBSD 14.3-RELEASE tunefs(8) page, read in the -j and -n options.",
    "Historical quantities retain their original source scope. The tunefs143 journal-recovery time statement is not presented as an end-to-end recovery guarantee."
  ]
}
