Analyses / Filesystem recovery
Soft updates: consistent metadata without a full journal
Published 15 October 2026 / Updated 1 December 2026 / Historical papers and a constructed model
A filesystem can preserve safe metadata relationships without logging every metadata change. That does not promise that every recent application update survives, or that every byte of free space is immediately reclaimable.
On this page12 sections
Order the dependency, not every system call
Soft updates tracks individual metadata dependencies and enforces them during writeback. A new pointer must not expose an uninitialized object; a resource must not be reused while old references remain. [1]
Whole-block dependencies can form cycles because one block contains many independent changes. The 1999 BSD implementation temporarily rolls back unsafe changes in a buffer, writes a safe image, then restores the newer in-memory values. This is selective writeback, not an application-visible transaction rollback. [1]
The trade-off includes dependency tracking and deferred reclamation. Journal replay instead uses persisted recovery information. These are different mechanisms for controlling intermediate persistent states, not synonyms for data durability.
This article describes the classical mechanism. FreeBSD 14.3 separately exposes soft updates and soft updates journaling settings; an actual UFS installation can use both. The latter adds log writes to shorten cleanup, but its journal cannot repair errors it never recorded. [5]
Let applications name the dependency
Featherstitch represents filesystem changes as dependency-bearing patches. Its patchgroups let applications order collections of changes; pg_sync requests durability. Grouping alone does not promise atomic application updates. [6, sections 3 and 5]
Apply that distinction to our allocation model below. Even if one group contains A and D, requiring P to follow the group only restricts when P may persist. It does not, by that requirement alone, forbid an interruption after A but before D. Nor does creating the dependency assert that P is already durable when the application replies. An atomic commit mechanism and a durable acknowledgement address different requirements. This is reasoning about our simplified model, not a replay of Featherstitch.
Sealing is part of the API contract: pg_depend(Q, P) makes Q depend on P, after which P cannot be engaged again. The kernel must know P's complete set of changes before admitting that dependency. This prevents applications from extending P indefinitely and holding dirty blocks in memory; it is not an atomic-commit operation. [6, section 5.1]
Choose the comparable synchronization policy
In the authors' 1,000-message IMAP experiment, full-journal Featherstitch with patchgroups took 1.4 seconds. Linux ext3 took 19.9 seconds syncing per operation, but 1.3 seconds syncing per durable operation. Reported times are means of five runs on Linux 2.6.20.1 and a SATA HDD. These historical single-machine results compare policies, not modern storage products; the small timing difference is not a significance test. [6, figure 11]
When evaluating an optimization, list exactly which completed operations must survive a crash. Compare implementations at that same boundary, and report the CPU and I/O costs as well as elapsed time. A faster configuration that promises less cannot establish an equivalent-contract speedup.
Do not translate an old API name into a current guarantee
The paper's introduction to patchgroups mentions sync_file_range(). For Linux, its documented contract does not synchronize file metadata or flush volatile device write caches. It is not a substitute for fsync() in a durability protocol. [7, Warning]
fsync() covers file data and metadata and waits for the device's completion report; the containing directory may need its own synchronization. A failed synchronization must not be acknowledged as success. [8] See the existing rename protocol and synchronization-error analysis. The research patchgroup API is not a recipe for replacing these Linux calls.
When can undo data be omitted?
A hard patch carries no undo data. Featherstitch permits this when future dependencies cannot force that patch to be rolled back. Its conservative test avoids a graph traversal: no other block may depend on uncommitted changes in this block. This relies on restricting later dependency additions; a clean-looking snapshot alone is insufficient. [6, section 4.1]
Hard does not mean durable or dependency-free. Same-block hard patches can be merged because they must travel together. The optimization reduces bookkeeping; it does not add transaction atomicity. [6, sections 3.1 and 4.2]
A three-change counterexample
Consider our constructed chain: b requires a, and c requires b. Changes a and c share block X; b is on Y. The patch graph is acyclic, but grouping whole blocks gives opposing requirements. Writing X with both changes is unsafe before b; writing Y is unsafe before a.
- Hold back
cand persist X containing onlya. - After that completion, persist Y containing
b. - After Y completes, persist X again, now including
c.
Discarding every undo buffer would prevent the first step in an implementation that stores only the latest block image. This example explains why the eligibility proof matters. It does not measure memory savings or implement Featherstitch's optimization.
The executable counterexample reuses our ordering checker. It checks the rejected whole-block choices, each safe step and all six serial commit orders. Only a, b, c preserves every prefix. Torn writes and device failures remain outside this model.
When does merging remove a legal write order?
The preceding counterexample also limits overlap merging. Two changes to the same bytes cannot always share a lifetime. A dependency path that leaves their block and returns to the older change can require separate writes. A common predecessor on another block does not, by itself, cause this problem. [6, section 4.3]
These constructed examples use letters for blocks and numbers for patches. Each patch requires the one to its left in the displayed chain; the final patch also directly requires the first. Prerequisites on the same block may commit together. Braces below identify one abstract block write.
| Patch chain | Forced pair | A legal merged schedule |
|---|---|---|
| A0 then B1 then A2 | A0 + A2 | No legal schedule |
| B0 then A1 then A2 | A1 + A2 | {B0} then {A1, A2} |
| A0 then A1 then A2 | A0 + A2 | {A0, A1, A2} |
In the first row, the unmerged order remains A0, B1, A2. Combining A0 with A2 removes that escape route. In the second row, committing B0 first satisfies both A patches. In the third, every prerequisite fits within one write. Rejecting every off-block predecessor would discard the second row's valid optimization; merging every overlapping pair would admit the first.
The path criterion and an independent search through completed-patch sets agree on 4,233 configurations. The enumeration fixes an oldest/newest overlapping pair in age-ordered graphs of two to five patches, with two possible block labels. It is not a proof about arbitrary graphs, a crash probability or a native Featherstitch test.
The historical implementation bounded its graph search and could conservatively decline a safe merge. This model instead exhausts its small, fixed graph; it does not reproduce that heuristic or future dependency additions. Merging soft patches also does not automatically remove their need for undo data. [6, sections 4.1-4.3]
Download the method and assumptions, generated rows and schedules, model and tests. Run node --test model.test.mjs with both code files and result.json together. No storage device or package install is needed.
Removing ordering changes the recovery contract
NoFS (FAST 2012) uses backpointer-based consistency: data blocks identify their owner and logical offset. A mismatched reference can fail instead of returning another file's data. This requires atomic persistence of the block together with its backpointer. It does not establish version consistency or atomic transactions. The prototype excludes mmap and direct I/O. [9, sections 3.2, 4.2 and 4.4]
An interrupted cross-directory rename illustrates the boundary: readdir may list a file in both directories, while pathname lookup rejects the parent that disagrees with its inode backlink. Other crash points can leave the inode unlinked. Backlinks can help recover an orphan when all its data blocks validate; they do not guarantee an entirely pre-rename or post-rename state. Identity checks are therefore not transaction rollback. [9, sections 4.2.3-4.2.5 and 4.4]
In the NoFS prototype, mount completion is not scan completion. Before an inode is verified, stat() checks every referenced data block; the first overwrite of an unverified block also reads it to check ownership. Unexamined blocks cannot safely be allocated, so apparently exhausted free space can trigger an additional scan. Measure this verification interval separately from mount time and steady-state throughput. No modern latency bound follows from these historical mechanisms. [9, sections 4.3-4.4]
OptFS (SOSP 2013) addresses a different contract. Transactional checksums, delayed block reuse and selective data journaling support recovery despite reordered writes. Its research osync() interface requests ordering with eventual durability; dsync() additionally requests immediate durability. Neither is a standard Linux API. The design also requires durability notifications from the storage layer: checkpointing waits for the relevant transactions, and block reuse waits until the previous owner has durably released the block. Omitting flushes alone does not implement OptFS. [10, sections 4 and 7]
The application must supply its ordering boundaries. Without either synchronization call, W2 may survive without W1. In the paper's sequential example, calling osync() after each write permits recovery to an earlier prefix, including the empty prefix; it does not promise that the latest completed call's writes survived. Calling dsync() instead makes preceding writes durable on return. This is a contract for the specified call sequence, not a prefix of arbitrary unsynchronized system calls or a measured probability of losing writes. [10, section 4.4]
An ordered prefix is not an application transaction. Consider two independent file updates, A then B, each followed by osync(). The allowed prefix containing only A can violate an application's requirement that A and B change together. This is Hesela's deduction from the sequential contract, not an observed OptFS failure. A final dsync() return establishes durability in that contract; it does not make earlier interruption points all-or-nothing. [10, section 4.4]
ALICE's later study separates ordering from atomicity across system calls. Its hypothetical ext3-fast model avoided the studied ordering vulnerabilities but retained durability and cross-call atomicity vulnerabilities. This was a model of a proposed filesystem, not a test of OptFS or a universal application-safety proof. [15, sections 4.4.1 and 4.6] An application-specific recovery checker must still reject partial logical transactions; a filesystem-prefix check alone answers a different question.
The pinned prototype's README documents another consequential choice: its default fsync() behaves as osync(). An unchanged application's synchronization calls therefore do not retain their usual immediate-durability guarantee. The README directs applications needing durability to dsync(). This historical prototype behavior does not redefine standard Linux fsync(). [13, Caveats]
The prototype substituted a 30-second timeout for unavailable durability notifications, starting from device acknowledgement rather than filesystem issue time. This requires a device-specific upper bound: too large a value delays progress and increases memory pressure; too small a value can compromise consistency. It is not merely a choice of how many recent writes to lose. [10, sections 5.1 and 5.3]
The pinned public code sets JBDBF_CHECKPOINT_INTERVAL to 30000 and converts milliseconds to kernel ticks when deferring checkpointing. This confirms a configured delay, not a measured maximum persistence time. We inspected source; we did not run this historical kernel. [11] [12]
Hesela's engineering interpretation: if a timeout authorizes block reuse before the old owner's release is durable, a crash can leave the old reference pointing at another file's new bytes. That is an ownership failure, not a harmless stale prefix. Checksums can reveal a problem without restoring overwritten bytes. A sleep alone is not a substitute for the required storage contract. [10, section 4.3.5]
One recovery detail matters: OptFS first checks whether a later valid transaction explains a data-checksum mismatch, then replays up to the earliest unresolved transaction. Stopping at every initial mismatch would confuse a legitimate overwrite with incomplete persistence. [10, section 5.3]
For a proposed optimization, specify the recovery oracle before timing it: acceptable object identity, acceptable version, and the point at which success must survive a crash. A benchmark should count rejected reads and unavailable objects, not only successfully completed operations. Otherwise an apparent speedup can conceal a changed service contract. This is an engineering checklist, not a reproduction or performance comparison of either prototype.
What did the OptFS crash tests cover?
The authors reported 400/400 selected simulated crash scenarios recovering consistently. Two synthetic workloads used frequent osync(); reordered, truncated write traces created the images to recover. These were not physical power cuts. [10, section 6.1 and table 1]
| Workload | Delayed write class | Consistent / tested |
|---|---|---|
| Append | Data | 50 / 50 |
| Append | JM, JC | 50 / 50 |
| Append | Multiple blocks | 100 / 100 |
| Overwrite | Data | 50 / 50 |
| Overwrite | JM, JC | 50 / 50 |
| Overwrite | Multiple blocks | 100 / 100 |
Hesela's interpretation: this is not a field failure probability or validation of the device-specific timeout. The dissertation describes preserving flush semantics during reordering; it is the same research lineage, not an independent replication. [14, section 6.4.1] We have not rerun these experiments.
Download the sourced aggregate counts. This extraction is not raw per-scenario traces.
Sent is not committed: when can patches travel together?
Featherstitch allows a dependent patch to commit with its predecessor in the same block. Across blocks, an in-flight predecessor is insufficient because the controller may finish blocks in either order. Each pending block needs its predecessors already committed or included in that same pending block. The abstraction supplies no block atomicity; the filesystem's recovery design still has to handle its storage contract. [6, sections 3.1-3.3]
A safe snapshot is not a submission rule. The buffer cache must wait until a block has no in-flight version before sending another one, and it must eventually write every dirty block. The checker assumes one pending version per block label; it does not encode request identities, admission transitions or liveness. [6, section 3.2]
Committed means stable storage, not volatile cache acknowledgement. Section 7 requires that distinction at the device-completion boundary. If p is only cached but labelled committed, the third row passes on the supplied labels even though q could reach stable storage first. The checker cannot verify that an acknowledgement is durable. [6, section 7]
Our checker below sets q to depend on p. The second row is unsafe even though both writes have been sent: completing Y first leaves q durable without p. Both writes eventually finishing would hide that intermediate violation.
| State | Blocks p / q | Safe? |
|---|---|---|
| Same block, together Committed: None; in flight: p, q | X / X | Yes |
| Different blocks, both pending Committed: None; in flight: p, q | X / Y | No |
| Different blocks, p committed Committed: p; in flight: q | X / Y | Yes |
The tests compare the closure rule with every possible completed subset of pending blocks across 5,832 small configurations. This checks our implementation, not the historical system. Torn writes, write errors, recovery and volatile caches are excluded; a passing row is not a transaction or power-loss guarantee.
Download the state rows, checker and tests. With both code files together, run node --test model.test.mjs. The earlier allocation model below remains unchanged.
A pointer can be too early in two different ways
Consider one initially free, uninitialized and unreferenced block. In our deliberately simplified model, A marks it allocated, D initializes its contents and P publishes a pointer. Each action is an atomic persistent change. The invariant is: whenever P is present, both A and D must be present.
This model enumerates all six permutations and four interruption boundaries per permutation, including before the first write. A and D may occur in either order; P needs both. The model abstracts the allocation dependencies discussed in section 2 of the 1999 paper; it does not implement its buffer rollback machinery.
Constructed results, not measured failures. Prefix numbers count completed persistent actions. Repeated states occur in different traces.
| Persistent order | Unsafe prefixes | Safe at every boundary? |
|---|---|---|
A / D / P | None | Yes |
A / P / D | 2 | No |
D / A / P | None | Yes |
D / P / A | 2 | No |
P / A / D | 1, 2 | No |
P / D / A | 1, 2 | No |
All six final states satisfy the invariant. A test that checks only after everything finishes would miss all the bad intermediate states. Conversely, the A/D prefix is safe but has allocated space without a persistent pointer. Safety is not the same as reclamation, nor proof that a new file is durably reachable.
There are 24 order-prefix pairs, six unsafe pairs and two orders safe throughout. These are exhaustive counts in this state space, not crash probabilities. No distribution over real write scheduling or interruption time was measured.
Download the results with assumptions and code hash, model and tests. With the two code files together, run node --test soft-updates-ordering.test.mjs. No packages or storage devices are needed. Torn writes, volatile caches, concurrency, errors and recovery are outside the model.
Why the benchmark contract matters
Seltzer and colleagues compared soft updates with several journaling configurations in a common FFS setting. Their 2000 study separates synchronous from asynchronous logging and same-disk from separate-log-disk arrangements. Workloads included microbenchmarks, Netnews, SDET and PostMark. [2]
Results changed with workload and write policy: deferred deletion helped some runs, while short buffer residence reduced aggregation. The useful lesson is to compare persistence promises and workload behavior before comparing elapsed times. This is historical implementation evidence, not a ranking of present-day UFS, ext4, ZFS or NVMe devices. We have not reproduced these benchmarks.
Background checking needs a restricted repair problem
McKusick's 2002 design runs checking against a snapshot, then reclaims lost resources through kernel interfaces while the live filesystem continues. The snapshot supplies a stable view; it is not an ordinary scan racing arbitrary filesystem changes. [3]
Reported idle-filesystem snapshot timings, not fsck completion times. Source: 2002 paper, table 1. Test system: FreeBSD 5.0-current dated 30 December 2001, dual Celeron 350 MHz, SCSI storage; filesystems were 90% full.
| Reported size | Total elapsed time | Filesystem suspension |
|---|---|---|
| 0.5 GB | 0.7 s | 0.025 s |
| 7.7 GB | 3.5 s | 0.034 s |
The short suspension is only one interval inside the operation. It is not evidence of zero overhead or a modern latency guarantee.
The version-pinned FreeBSD 14.3 manual limits background checking to eligible filesystems. Unexpected errors cause it to request foreground checking and stop further cleaning. Soft updates must be enabled, the filesystem must be writable and mounted, and it must not already require a foreground check. [4] These conditions are part of the contract.
Three questions to keep separate
For an engineering review, ask whether persistent references are safe, whether unused allocations have been reclaimed, and whether the application's required update survived. Our model answers only the first question for its tiny state space. Successful mounting or checking cannot substitute for an application-specific recovery oracle.
Related reading: crash-test oracles, durable rename and scrubbing boundaries. Corpus: metadata update dependency and background fsck.
Primary sources
- McKusick and Ganger. Soft Updates: A Technique for Eliminating Most Synchronous Writes in the Fast Filesystem. FREENIX 1999, pp. 1-17, sections 2-4.
- Seltzer, Ganger, McKusick, Smith, Soules and Stein. Journaling Versus Soft Updates: Asynchronous Meta-data Protection in File Systems. USENIX ATC 2000, pp. 71-84.
- McKusick. Running "fsck" in the Background. BSDCon 2002, pp. 55-64, sections 4-7.
- FreeBSD 14.3-RELEASE fsck_ffs(8): background checking, eligibility and exit status.
- FreeBSD 14.3-RELEASE tunefs(8): distinct soft updates and soft updates journaling settings.
- Frost et al. Generalized File System Dependencies. SOSP 2007, sections 3-5 and 8; figures 4 and 11.
- Linux man-pages 6.19: sync_file_range(2), Warning.
- Linux man-pages 6.19: fsync(2), Description and Return value.
- Chidambaram, Sharma, Arpaci-Dusseau and Arpaci-Dusseau. Consistency Without Ordering. FAST 2012, sections 2.1, 3.2-3.3, 4.2-4.4 (including allocation reconstruction in 4.3).
- Chidambaram et al. Optimistic Crash Consistency. SOSP 2013, sections 4-7 and Table 1. DOI: 10.1145/2517349.2522726.
- OptFS source at commit 0c7464b8cd29ed174de56cb91e56ec1d49928507: jbdbf.h, JBDBF_CHECKPOINT_INTERVAL (line 1357).
- OptFS source at commit 0c7464b8cd29ed174de56cb91e56ec1d49928507: commit.c, checkpoint scheduling (lines 1007-1013).
- OptFS README, Caveats: fsync() defaults to osync(). Commit 0c7464b8cd29ed174de56cb91e56ec1d49928507.
- Chidambaram. Orderless and Eventually Durable File Systems. PhD thesis, Wisconsin-Madison, 2015, section 6.4.1 and Table 6.3, pp. 135-136.
- Pillai et al. All File Systems Are Not Created Equal. OSDI 2014, sections 4.4.1 and 4.6, pp. 443-445.
Source review: 15 October 2026; Featherstitch and Linux API review: 24 October 2026; in-flight dependencies and NoFS reviewed 13 November 2026; OptFS timeout and pinned source reviewed 24 November 2026. Historical claims retain their original scope. No unverified DOI, modern benchmark or physical crash test is claimed.