Skip to content

Research notes / Filesystem persistence

Atomic rename is not a durable commit

Published 11 October 2026 / Updated 15 November 2026 / API review and local filesystem observations

Replacing a filename atomically answers a visibility question. It does not, on its own, establish that the new bytes and their name will survive a system crash.

On this page28 sections

Which filesystem owns the persistence promise?

A filesystem organizes files and implements their operations. Linux VFS provides a common interface over different implementations; it is not one shared disk format. A cached name, an inode and the filesystem's stored representation belong to different parts of that arrangement. [57]

Start by identifying what backs the files. A local filesystem can sit on a SAN-provided block device, while an NFS client accesses files through a server protocol. Network transport alone therefore does not tell you which layer manages the file layout. [58]

File operations do not identify the backing storage
ExampleBackingBoundary to check
Local ext4Block storage, including a dedicated SAN volumeFilesystem and device persistence behavior [58]
NFS clientFiles accessed through a remote serverProtocol and server persistence behavior [58]
TmpfsVirtual memory, with optional swapContents are lost when the instance is unmounted [59]

Tmpfs is a concrete counterexample to equating a filesystem with persistent media. It manages files without placing a regular filesystem on a RAM block device. Swap use does not preserve the files after unmounting. This is documented behavior, not a crash experiment. [59]

Evidence has a direction: a failing recovery case can refute a guarantee, while passing selected cases cannot prove it. In the OSDI 2014 study, BOB reordered traced block writes within barrier constraints and ran filesystem recovery on the resulting images. Its limited exploration could find counterexamples, not certify every execution. Treat those historical results as a method lesson, not a current-kernel guarantee. [3]

For persistent files, the distinction remains important: syncing file data does not necessarily persist the directory entry. The update sequence below addresses both objects, subject to the actual implementation's synchronization support. [2]

A directory names files; listing it does not freeze them

A directory is the filesystem object that organizes names. Its entries, the files they name and Linux's in-memory dentries are distinct. Renaming changes the namespace; it does not copy the named file's contents into the directory. This is why persisting the file and persisting its name are separate questions. [57] [2]

Separate listing from lookup. POSIX.1-2017 opendir() checks search access through the path prefix and read access to the listed directory. On Linux, directory execute permission means search permission. Knowing a name, listing it and being allowed to read the named file are different facts; the target operation still has its own access checks. [60] [28]

A completed listing does not by itself provide a snapshot. POSIX.1-2017 leaves unspecified whether a name added or removed after opendir() or rewinddir() is returned by later readdir() calls. Atomic replacement of one destination does not extend that guarantee to a whole scan. See directory enumeration and the existing traversal experiment for the separate inventory problem. [61]

One path, two kinds of state

Linux rename() can replace an existing destination without a moment when another process finds that destination absent. Existing open descriptors remain attached to their files. This is a namespace operation, not an instruction to flush the new file's contents. [1]

The fsync() manual distinguishes file data and metadata from the directory entry that makes the file reachable by name. Synchronizing the file does not necessarily persist that entry; Linux documents an additional sync on the directory descriptor. [2]

For a configuration update, ask two separate questions: can a reader observe a partial replacement while the system is running, and which version must be reachable after recovery? A passing test of the first does not settle the second.

The name changes; existing readers do not

On Linux, an inode is the file's metadata object, identified within its filesystem by an inode number; a directory entry supplies a name and an open file description holds an open reference. A hard link supplies another name for the same file, not another copy. In-place changes are shared, but replacing one name does not update the others. [6] [7]

Suppose target and alias name the old file and a reader has already opened it. Renaming a distinct temporary file over target makes later opens of that name reach the new file. The already-open reader and alias still reach the old file. Reopen or coordinate a reload if readers must switch versions; an atomic rename is not a broadcast to open descriptors. [1] [8]

Unlink removes a name, not every reference. Removing the old file's final hard link can leave it readable or writable through an existing descriptor. Releasing all remaining references is a different boundary from removing the pathname; neither proves physical erasure. [9]

The atomic guarantee concerns replacement of an existing destination, not a consistent snapshot of both pathnames. Linux permits a period when both names identify the source. If both names already refer to the same inode, rename succeeds without changing either name. On Linux, rename across distinct mount points fails with EXDEV; a copy-and-delete fallback is a different protocol. [1]

The mount boundary matters

A mount point is an attachment location in the filesystem hierarchy, not a disk identifier. On Linux, a target can be a directory or a file, and a bind mount can expose a subtree or one file. Mounting over a directory hides its previous contents from ordinary lookup through that location; it does not delete them. [62] [63]

In /proc/PID/mountinfo, root describes the root within the mounted filesystem, while mount point gives the attachment path relative to the target process's root directory. Inspect the relevant process's view; another process can have a different mount namespace. A mount ID can be reused after unmount; a parent outside the process's root may be absent from the list. Do not treat the listing as a permanent identity catalogue or a content snapshot. [64]

Linux rejects a rename between distinct mounts with EXDEV, even if both expose the same filesystem. Matching device identifiers therefore does not establish that two paths allow atomic replacement. As an engineering consequence, the scoped replacement sequence below creates its temporary file in the destination directory and checks the actual rename result, assuming a stable namespace. Copying and then deleting across mounts is a different protocol, not an atomic-rename substitute. This restriction is separate from the file and directory synchronization needed for durability. [1, EXDEV] [2]

This addition is documentation synthesis, not a mounting, rename or crash-recovery experiment.

A saved handle is not a retained open file

A Linux file handle records opaque object identity for a filesystem, not a saved pathname. Export operations translate between that identifier and filesystem objects. This differs from the reference retained by an already-open descriptor. [48]

The Linux v6.8 handle-encoding path releases its lookup reference before returning. Keeping the resulting bytes therefore does not keep the file open. A later reopen decodes the handle again. Compare this with an open local file that remains accessible after its final name is unlinked; storing an identifier does not provide that same lifetime guarantee. [50] [9]

Handle type matters. AT_HANDLE_FID (since Linux 6.5) does not promise reopening, and an AT_HANDLE_CONNECTABLE handle (since Linux 6.13) can become unusable after a move to another parent. Filesystem support, mount context and privileges also apply. Treat ESTALE as failed reopening, not as a media-failure diagnosis. [47]

In the pinned ext4 implementation, a supplied nonzero generation must match the inode's generation or the lookup returns ESTALE. Zero skips this comparison. That check concerns object identity, not whether file contents changed; it is not a portable format to decode in application code. [49]

Mount identity has a separate lifetime. AT_HANDLE_MNT_ID_UNIQUE (since Linux 6.12) requires at least a 64-bit mount_id output buffer and corresponds to statx STATX_MNT_ID_UNIQUE (since Linux 6.8). That ID is not reused during the running system, but is not a persistent filesystem identity across reboot or an unmount/mount cycle. [47] [51]

Handle acquisition can fail before reopening is possible. EOVERFLOW with a larger returned handle_bytes requests more storage; the same error without an increased size can instead mean no handle is available for that name. Do not treat every EOVERFLOW as a buffer-sizing retry. [47]

Object identity, live references and extra names
MechanismWhat it preservesWhat it does not preserve
Already-open local descriptorAccess to the open file after its last name is unlinked, while an open reference remains. [9]A frozen byte version or a durable pathname.
Saved Linux file handleAn object identifier for a later filesystem lookup. [50]An open reference or a guaranteed successful reopen.
Hard link in the same filesystemAnother name for the same inode until that name is removed. [7]A separate data copy; writes through either name affect the same file.

Recovery implication: separate which object was identified, whether it can still be opened, and which data version is available. A handle inventory alone is not a retained backup. This addition is source review, not a syscall, deletion-recovery or power-loss experiment.

Cached names do not reserve a pathname

A Linux dentry is the VFS's in-memory name-lookup object, not the on-disk directory record whose persistence matters after a crash. Multiple dentries can reference one inode. Keeping a cached name available is therefore separate from synchronizing filesystem namespace changes. [38] [2]

Cache state and what it establishes during lookup
StateMeaningNot established
Positive dentryThe dentry has an associated inode.A frozen version of the file's contents.
Negative dentryThe dentry has no associated inode and can cache absence.A reservation preventing another creator.
Cache missNo usable cached answer was obtained.Proof that the name does not exist.

The table summarizes lookup state, not measured cache behavior. The Linux v6.16 lookup documentation distinguishes locally coherent caches from network or clustered filesystems that require revalidation. A cache miss and a cached negative answer are different; a cache hit is not a universal remote-freshness guarantee. [39]

The v6.16 unlocked-lookup helpers explicitly warn that even a referenced negative dentry can become positive while the parent is unlocked. Consequently, an earlier absence check cannot replace a conditional create. Where supported, open(..., O_CREAT | O_EXCL, ...) fails with EEXIST if the path already exists; the ordinary O_CREAT flag alone does not request that exclusion. This handles the creation decision, not durability or a later publication step. For publication without replacement, see the separate temporary-file and rename contracts. [40] [8]

An ordinary symbolic link stores a pathname. A relative target is interpreted from the directory containing the link, not the reader's working directory. Moving that link can therefore change its destination or leave it dangling. Procfs magic links have different, handle-based semantics. [27] [30]

In a successful sequential example, let soft point to target before a distinct file replaces target. A later ordinary open through soft reaches the replacement; an already-open descriptor and another hard link to the original file still reach the original. But renaming a distinct third file over soft replaces the final symlink entry; it does not write through the link into its referent. Ancestor symlinks can still be followed. This follows from the documented APIs, assuming no other namespace changes, not a crash-test result. [1] [8] [27]

To inspect the final link itself, use lstat() for its metadata and readlink() for its stored target text. stat() follows that link. A dangling link can therefore still be present even when looking up its referent fails. These calls do not freeze the namespace between observations. [31] [32]

Read the complete link text: the C readlink() API returns a byte count, adds no NUL terminator and can silently truncate its output. A count equal to the buffer capacity is ambiguous: the text may fit exactly or have been cut short. Grow the buffer within an explicit resource limit and retry, or report that completeness was not established. An earlier lstat() size is only a starting estimate when the pathname can be replaced. On Linux, readlinkat(fd, "", ...) can read the link held by an O_PATH | O_NOFOLLOW descriptor; this binds link identity, not the later lookup of its referent. These are raw API rules; language wrappers may allocate the buffer for callers. [32]

A reference is not a readable backup source: an O_PATH descriptor supports metadata inspection, but read() on it fails with EBADF. Acquiring it does not establish permission to read the data. Holding the reference also does not freeze changes made through another writable descriptor. Choose the required data-access and consistency protocol separately. It also cannot synchronize a parent directory: fsync() on an O_PATH descriptor fails with EBADF. [8]

Restore implication: preserving a relative link's text is not enough to preserve what it reaches after moving it to a different parent. Specify whether recovery should retain the link object and its surrounding layout or copy the referent's data. This is an application of the lookup rules, not a measured backup failure rate. [30]

Path resolution also determines which object is opened. O_NOFOLLOW controls only the final component; O_PATH | O_NOFOLLOW can obtain a descriptor for the link itself. For openat2(), RESOLVE_NO_SYMLINKS prevents link traversal throughout the path. Directory containment and mount-crossing policies are separate controls. These flags govern that open, not a subsequent rename, and do not replace synchronization or application authorization. [8] [28] [29]

Keep the lookup policy when retrying

A directory descriptor sets a starting point, not automatically a boundary. Two openat2() policies give different meanings to paths: [29]

  • RESOLVE_BENEATH rejects escapes from the starting directory, including absolute paths and absolute symlink targets. It can still follow relative symlinks and .. that stay beneath that directory.
  • RESOLVE_IN_ROOT interprets absolute paths and absolute symlink targets relative to the supplied directory. At that root, .. stays there. This changes resolution for the individual open, not the process root.

Choose one policy. Linux v6.12 rejects their combination with EINVAL. Add RESOLVE_NO_SYMLINKS to prohibit symlink traversal, or RESOLVE_NO_XDEV to prohibit mount-point crossings, including bind mounts. These are separate restrictions, not consequences of choosing a root. [36] [29]

Under either rooted policy, EAGAIN can mean the kernel could not establish confinement during a concurrent change. It is uncertainty, not proof of an attempted escape. The pathname-lookup documentation explains the conservative check around .. and directory renames. [37]

RESOLVE_CACHED can also produce EAGAIN when lookup needs revalidation or I/O. Its fallback may remove only the cache-only requirement while retaining containment, mount and link restrictions. Use a bounded retry policy or report failure; silently switching to unconstrained openat() abandons the original contract. [29]

Capture implication: confined lookup does not freeze file contents, establish a consistent backup snapshot or constrain a later rename. Keep lookup policy, data consistency and the persistence sequence separate. This is API and version-pinned source review, not a new race or crash experiment. [8] [2]

EAGAIN does not identify a cold pathname

RESOLVE_CACHED limits pathname lookup to cached information. It does not certify file-data residency or make subsequent reads nonblocking. [29]

Linux v6.12 source-derived behavior with RESOLVE_CACHED and otherwise valid arguments. Not native measurements. [36]

Linux v6.12 cache-only open contracts
Open flagsDecision stageResult
O_RDONLYLookupEligible for cache-only lookup; success is not guaranteed.
O_RDWR | O_CREATFlag validationEAGAIN before pathname lookup, even for an existing file.
O_RDWR | O_TRUNCFlag validationEAGAIN before pathname lookup.
O_RDWR | O_TMPFILEFlag validationEAGAIN before pathname lookup.

The create/truncate guard runs before pathname lookup. Even a cached, existing file does not exempt O_CREAT. Invalid arguments can fail earlier for another reason; repeatedly retrying the same valid flag combination cannot remove this guard. [36]

A usable cached negative dentry can instead return ENOENT: a cached answer can mean absence. Rooted-lookup races are another possible source of EAGAIN, so that error alone is not a cache-miss counter. [41] [29]

When falling back, remove only the cache-only requirement while keeping the intended confinement and link policy. The retried create or truncate can then change data. This remains separate from a persistence or snapshot guarantee.

Why a cache hit is not a synchronization-free operation

Sarma and McKenney's Linux Symposium 2004 paper separates lock-free dcache lookup from the remaining synchronization costs. Section 5.4 describes per-dentry locking after a successful lookup and contention near the root on large SMP systems. This is historical evidence about Linux 2.6, not a measurement of modern openat2() or proof that every present-day cache hit takes that lock. [42]

The later RCU-walk design avoids shared-reference updates while traversing stable, cached names, but it can abandon that path when validation fails. Linux v6.12's path_init() returns EAGAIN when a cache-only request would start without RCU-walk. Cache residency, concurrency validation and payload access are distinct questions; an error count cannot collapse them into one cache-hit metric. [43] [41]

Evidence limit: our attempted native probe returned ENOSYS before its first test case. The table comes from source inspection, not observed syscall outcomes or performance measurements. Download the source-mapped table and hashes.

Layered filesystems add a visibility boundary

Copy-up is not proof of a complete data copy. With metadata-only copy-up, upper metadata can still depend on lower payload. A writable open can initiate data transfer before the first application write; a truncating open need not retain the previous bytes. Linux v6.12 can also clone the data instead of allocating an independent copy. [33] [35]

Recovery implication: preserving only the upper tree can omit required lower data. Preserve coherent layer dependencies or capture the intended merged content under an explicit consistency policy. This follows from the architecture; it is not a restore experiment. Metacopy alone provides neither authentication nor a crash-durability guarantee. [33]

On OverlayFS, a lower or merged directory rename fails with EXDEV when redirect_dir is disabled. Enabled redirects allow a different path: copy up the directory, not its contents, record its original location and move it. Check the configured feature instead of treating every EXDEV as evidence of crossing mounts. [33]

Engineering implication: a tool's recursive copy-and-remove fallback is a multi-step operation, not the single atomic replacement of an existing destination promised by a successful rename(). It needs its own interruption and concurrent-reader policy. Neither completion path alone proves crash durability. [33] [1] [2]

A whiteout hides a lower name; it does not erase the underlying object. Do not confuse a live filesystem marker with its archive representation. OCI v1.1.1 uses empty regular .wh.<name> entries for deletions and .wh..wh..opq for lower-directory children. Same-layer additions survive those markers. Applying these changes is not ordinary TAR extraction; a restore that ignores them can expose names intended to remain absent. That restore consequence is an inference from the format, not an observed failure. [1] [34]

A device node is not stored payload

A character device is not a small block device or a guarantee of persistent storage. On Linux, S_ISCHR(st_mode) identifies the S_IFCHR type. st_rdev records the represented device number; st_dev describes the filesystem device containing the inode. A node created by mknod() and a device registered through the kernel character-device API are distinct objects and operations. [6] [65] [66]

Both /dev/null and /dev/zero discard writes. Reads return EOF from the former and zero-valued bytes from the latter. Neither example retains the written payload, and neither defines every character driver's behavior. Seeking is device-dependent; the file type alone does not establish buffering, transfer size or durability. These are documented contracts, not a new device experiment. [67] [68] [66]

Removal is not revocation: Linux 6.12 cdev_del() prevents new opens of the registered device, but already-open instances can still invoke its file operations after removal returns. Do not equate deregistration with closing every existing handle. Continued callability is not a promise that I/O succeeds or that physical hardware remains available. [66]

Layer-aware interpretation: Linux 6.12 OverlayFS can encode a whiteout as a character-special 0:0 node or as a zero-size regular file with trusted.overlay.whiteout. In a merged directory, either marker hides the matching lower name and is itself hidden. An ordinary empty regular file without that attribute is not this regular-file whiteout form. A backup tool must interpret the layer's format; neither copying device-node metadata nor treating a marker as ordinary payload reproduces an arbitrary device's state. That recovery caution is an inference, not a measured restore failure. [33]

A socket address is not a message archive

A Unix-domain socket is a local communication endpoint, not a regular file containing queued messages. Linux marks a pathname socket S_IFSOCK rather than S_IFREG. bind() assigns the endpoint an address; preserving its directory entry is not a backup of application state. [6] [71]

Linux distinguishes pathname, unnamed and abstract addresses. Abstract names do not resolve through a filesystem path. Calling close() on a pathname socket does not itself remove its name; unlink() removes the pathname separately. An abstract socket disappears after all open references close. [69] [71]

Not every local channel has a directory entry: socketpair(AF_UNIX, SOCK_STREAM, 0, sv) creates two connected, unnamed endpoints. The returned descriptors identify the two ends without a pathname rendezvous. This is another reason to distinguish communication state from filesystem namespace state. [73]

The communication type matters. SOCK_STREAM does not preserve record boundaries. Linux Unix-domain SOCK_DGRAM preserves ordered messages reliably, while SOCK_SEQPACKET also requires a connection. Reliability is a transport contract, not a disk-persistence claim. [70] [69]

Linux checks pathname-socket permissions, but those checks are not portable to every Unix system. Abstract sockets have no filesystem permission-bit protection; changing a directory mode is not their access-control mechanism. [69]

Recovery implication: a successful send() is not an acknowledgement that the peer processed or durably stored the payload. Recover the service and its authoritative data under the application's recovery protocol, not by treating the socket node as a message archive. This is an inference from the documented interfaces, not a crash or restore experiment. File-descriptor handoff has a separate open-file-description contract. [72]

An NFS error can leave the outcome uncertain

The Linux manual describes a server that completes a rename, crashes, then rejects the retransmitted request. The client can receive an error even though the name changed. A failed return therefore does not always prove an unchanged namespace on NFS. [1]

This is not a claim that every NFS retry is unsafe. NFSv4.1 sessions provide replay protection; RFC 8881 distinguishes that protection from preserving the session and reply cache across server restart. Persistent sessions require atomic execution and recording of results. Check the negotiated protocol and recovery behavior before generalizing the manual's failure scenario. [10]

Hesela's engineering implication: after an ambiguous outcome, reconcile the expected version under the application's concurrency rules before retrying or deleting recovery files. A new application-level rename is not necessarily a replay of the original protocol request. The local demonstration below tests neither NFS recovery nor server reply caching.

A runnable observation, not a crash test

This sequential demonstration creates only disposable files in a fresh temporary directory. It holds a read-write descriptor to the old file, replaces its target name, removes the remaining old alias, then writes through the held descriptor. The table is generated from the recorded run; old, new and OLD are four-byte ASCII payloads including a trailing newline.

One Linux run. Columns distinguish path lookups from the held descriptor; link counts concern the old file.
Completed stepTarget readAlias readHeld descriptor readOld file links
Before replacementoldoldold2
After replacementnewoldold1
After unlinking old aliasnewName absentold0
After writing held descriptornewName absentOLD0

A separate same-inode no-op in the same run left both names present with link count 2. The script compares device and inode numbers for concurrently live files; it does not use an inode number as a permanent content identifier.

Recorded 2026-10-15 UTC using Python 3.12.3 on Linux 6.8.0-146-generic. The filesystem-type label reported by stat -f was ext2/ext3; that label is not a complete mount configuration. Download the Python source and recorded JSON with source SHA-256. Run python3 demo.py on Linux with Python 3 to print a fresh observation.

This run does not measure concurrent lookup atomicity, post-close space reclamation, media erasure or recovery after interruption. It performs no file or directory sync. The atomicity guarantee comes from the documented API; the persistence sequence below still needs its separate assumptions and checks.

A lock follows the opened file, not the replacement name

Atomic publication does not serialize competing writers. On local Linux, flock() ownership follows the open file description. Locking the destination and then replacing it can leave the lock on the old file while a new opener locks the replacement. This follows from the APIs; the observation below tests that consequence. [11] [1]

After replacement: a fresh process tries an exclusive lock while the original holder remains locked.
Coordination choicePeer lockSame file?
Lock the replaced targetAcquiredNo
Retain a separate lock fileDeniedYes
Delete and recreate the lock fileAcquiredNo

In every case, probes were denied before replacement and succeeded after release. During the held-lock interval, only the retained coordination file continued to exclude the second participant after target replacement. A separate probe through a temporary hard-link alias confirmed that the original file was still locked in every case. Device/inode pairs compare concurrently live files, not permanent identities. Every case published the bytes new plus a newline.

Recorded 2026-10-16 UTC using Python 3.12.3, Linux 6.8.0-146-generic, and the stat -f filesystem label ext2/ext3. That label does not identify every mount option. The script orders fresh subprocesses without sleeps or inherited lock descriptors. Download the Python demonstration and observations with source SHA-256; run python3 demo.py on a disposable local Linux filesystem. It uses a fresh temporary directory, not a supplied data file.

Protocol implication: all cooperating writers must acquire a compatible lock on the same retained coordination file before opening/reading the current target for a read-modify-write update. Keep that lock through replacement and any required synchronization, then release it. Do not unlink or replace the coordination file while participants may retain references, including waiters. Even cleanup after unlocking can split old and new participants across different files. This is an engineering synthesis, not a tested multi-writer persistence protocol. [9]

An advisory lock does not stop access that ignores the protocol. This experiment tests no crash, fsync(), network mount or failure rate. NFS and SMB/CIFS can alter lock interaction and enforcement; verify their actual configuration. Locking is not a replacement for the persistence sequence below. [11] [2]

Do not mix up ownership and API: fcntl OFD locks are byte-range locks, distinct from flock(). Traditional process-owned record locks can disappear when any descriptor for that file is closed; OFD locks have last-close ownership. They can conflict with traditional record locks even within the same process. Duplicated descriptors share ownership, so they are not independent contenders. The identity experiment uses flock() only; the separate OFD experiment below exercises the byte-range API. [12]

Choose the lock family, not just the owner

flock() is a whole-file API, not the struct flock argument used by fcntl(). The first table summarizes API documentation for local Linux filesystems. The measured matrix below is a separate observation. Explicit unlocking is separate from automatic release on close. [11] [12]

Local Linux lock families
APIRange and ownerAutomatic close releaseConflicts with
flock()Whole file; open file descriptionFinal reference to that descriptionIncompatible flock locks, not local fcntl record locks
F_SETLKByte range; processAny same-file descriptor closed by that processOverlapping incompatible process or OFD record locks
F_OFD_SETLKByte range; open file descriptionFinal reference to that descriptionOverlapping incompatible process or OFD record locks

Sharing a pathname is insufficient when participants choose noninteracting lock families. The kernel's historical release notes explain their separation; the current API manuals supply the ownership rules above. Same-process traditional locks and same-description OFD locks update their owner's existing range rather than competing with it; a process lock and an OFD lock can conflict even on one descriptor. Kernel locking notes; record-lock API.

A measured cross-process compatibility matrix

Hesela ran all nine ordered holder/contender pairs three times at each of -O0 and -O2: 54 sequences and 108 acquisition attempts, including release controls. The environment was Linux 6.8.0-149-generic, x86_64, ext4, with cc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0. Each record lock covers byte zero; flock covers the whole file. All requests are exclusive and nonblocking.

Acquisitions / 6; holder locked
Holder / contenderflockF_SETLKF_OFD_SETLK
flock0/6 acquired6/6 acquired6/6 acquired
F_SETLK6/6 acquired0/6 acquired0/6 acquired
F_OFD_SETLK6/6 acquired0/6 acquired0/6 acquired

The parent acquires its lock before forking. Each child closes the inherited descriptor, opens the same file independently and checks device/inode identity. The parent waits for that attempt, explicitly unlocks, then starts a fresh child: all 54 release controls acquired successfully. Unexpected API errors fail the run instead of counting as exclusion. These repetitions check consistency on one configuration; they are not a population sample or a failure-rate estimate.

Migration consequence: moving only some local writers from flock to either fcntl family can admit both kinds of writer. The two fcntl families did exclude each other in this probe, but their different close and conversion rules still require review. No file replacement, shared-lock conversion, network mount, crash, power loss or latency measurement is included.

Download the raw observations and source hashes, C probe, runner and validator tests. With these four files together, run:

python3 -B -m unittest test_matrix.py
python3 -B run.py --work-dir /path/to/disposable/local/directory --output rerun.json

Research boundary: Pillai et al.'s OSDI 2014 ALICE study evaluates post-crash states with application-specific checkers. Section 3.6 also explains its serialization of multithreaded system calls. Our live lock-admission matrix addresses a different question and is not an ALICE reproduction or evidence that acknowledged data survives a crash. Paper, sections 3.1 and 3.6.

Network mounts can change the protocol

Modern Linux NFS clients normally emulate flock with whole-file record locks, so the families can interact. Exclusive acquisition requires a write-open file. local_lock=flock instead confines flock exclusion to the client: another machine is not excluded. Check the effective mount configuration; this is not a recommendation to change it. [11] NFS mount options.

Since Linux 5.5, SMB emulation can make incompatible I/O through another descriptor fail with EACCES. It is therefore unsafe to label every flock use advisory. Server, protocol and mount options matter: nobrl suppresses server byte-range lock requests. These are documented differences, not results of Hesela's local probes. [11] CIFS mount options.

Before migrating a lock protocol: verify the same file identity, compatible API, ownership lifetime and actual filesystem scope for every writer. Keep the failed-conversion result and the persistence sequence as separate checks.

A second close can end a process-owned lock

Keeping the coordination file in place is only one requirement. A process-associated record lock has another boundary: on Linux, closing any descriptor for the same file in the owning process releases that process's record locks on it. The descriptor used to acquire the lock can remain open. This differs from flock()'s open-description ownership. [12] [11]

Hesela tested six ordered cases using fcntl.lockf() for traditional record locks and fcntl.flock() separately. Each fresh peer requested the same lock type as its holder, without inheriting the holder's descriptors. The record-lock range starts at byte zero and extends through future EOF. The extra descriptor was a separate read-only open, a read-only open through a hard-link alias, or a duplicate of the holder. [14]

Peer acquisition after the extra descriptor closes, with the original holder descriptor still open.
Descriptor closedRecord lockflock
Separate read-only openAcquiredDenied
Read-only hard-link aliasAcquiredDenied
Duplicate of holderAcquiredDenied

Controls matter: all peers were denied before the close and after closing an unrelated file. Every holder descriptor still identified the original file and read its five-byte payload after the extra close. After the holder also closed, all peers acquired the lock. The alias case changes the name, not the file; none of these cases replaces or deletes the target.

Recorded 2026-10-16 UTC using Python 3.12.3, Linux 6.8.0-146-generic, with filesystem label ext2/ext3. Download the standalone Python experiment and six-case JSON and source hash. Run python3 demo.py; only fresh temporary files are used. This observes lock lifetime, not SQLite corruption, crash durability, mixed-API conflicts, threads or F_OFD_*. The latter has its own experiment below.

Why this matters for databases: SQLite documents the hazard of directly opening, reading and closing its database file outside the library while connections are active. Normal connections through the library account for these locking rules. SQLite 3.51.0 added partial defenses for multi-process WAL use, not a general exemption. Use supported SQLite interfaces instead of bypassing its file ownership. [13, section 2.2]

Our engineering conclusion is narrow: retaining the pathname does not validate descriptor lifetime. Review every same-file open/close in the owning process, including library code. The lock API, object identity and descriptor lifecycle are separate parts of the protocol; none establishes persistence.

A read-only probe can erase an acknowledged SQLite update

Controlled result: after a raw database-header read and close inside the writer's process, a second writer began its own transaction while the original rollback-journal writer remained active. In 16 of 224 selected executions, both COMMIT calls returned success but the peer's acknowledged value disappeared. Every final integrity_check returned ok. These are fixture counts, not a production failure rate.

This reproduces SQLite's documented integration hazard, not a new SQLite vulnerability. A descriptor opened read-only can still change lock ownership when it closes. Use the library's supported interfaces; direct file inspection is not necessarily a passive observer. [13]

Protocol: measure exclusion and history separately

  1. Start with A=0 and B=0. The owner begins IMMEDIATE and writes A=1 without committing. An independent process must first fail BEGIN IMMEDIATE with SQLITE_BUSY.
  2. Perform the selected intervention. In the main-file case, the owner process opens the database read-only, reads its 16-byte header and closes that extra descriptor.
  3. A fresh peer process attempts BEGIN IMMEDIATE, writes B=10, commits and reads it back. Only after that process exits does the owner attempt COMMIT.
  4. Close all connections, then use a fresh connection to read both values and run full integrity_check. The owner never assigns B, so the peer's acknowledged B=10 must not silently revert to zero.
Raw main-file close, same-table layout: four executions per row, two repetitions on each build. Generated from the recorded observations.
Journal modePeer COMMITOwner COMMITFinal BIntegrity
DELETESuccessSQLITE_IOERR_DELETE_NOENT0 (acknowledged 10 missing)ok
TRUNCATESuccessSuccess0 (acknowledged 10 missing)ok
PERSISTSuccessSuccess0 (acknowledged 10 missing)ok
WALNot reached: BEGIN busySuccess0 (no peer commit)ok

The complete matrix contains four journal modes, two table layouts, seven interventions and two repetitions on each of two builds. All 224 baseline probes were excluded. After intervention the peer committed in 48 cases; its value disappeared in 24. The remaining 176 peer attempts failed at BEGIN. A hard-link raw close reproduced the main-path result. Keeping the descriptor open, closing an unrelated inode, using a normal same-library connection, or reading in a separate process preserved exclusion in these controls.

Why table layout and a passing checker can mislead

With values in separate tables rooted on different pages, the peer's value survived every admitted commit. Writer exclusion was still broken. The same-table loss is consistent with a cached page rewrite affecting another logical row; this is an interpretation of the geometry, not a traced write sequence.

Gaffney and colleagues describe the page cache, VFS boundary and page-oriented rollback workflow in sections 2.1.3 and 2.2 of their VLDB paper. Its single-client performance experiments do not test this interference. We use that architecture account to interpret the control, not as a replication claim. [21]

SQLite documents integrity_check as a formatting and consistency check. It has no external history of acknowledgements to compare against. A well-formed database can therefore hold the wrong application history without the checker violating its contract. Test writer admission and acknowledged values as separate properties. [22]

Reproduce within the stated boundary

Recorded 21 October 2026 on Linux 6.8.0-146-generic, x86_64, Python 3.12.3: distribution SQLite 3.45.1 (source ID ending alt1) and source-verified SQLite 3.54.1. Both used the unix VFS, 4096-byte pages and synchronous=FULL, with owner cache spill disabled. Compile options differ, so version number alone is not an experimental treatment.

Download the method and replay instructions, native Python runner, distribution-build observations, 3.54.1 observations, derived summary and SHA-256 inventory. The runner creates only disposable databases and accepts no user database path. Code is MIT; observations are CC0-1.0. The method links all files needed for verification.

WAL peers remained blocked on both builds. That does not demonstrate the partial defense announced in 3.51.0, test WAL cleanup or certify raw closes as safe. No -shm descriptor was closed. There was no crash, power interruption, network filesystem, thread-scheduling experiment or field sample. Replays are excluded from the 224-row denominator. A separate-process reader preserving locks also does not make raw live-file copying a consistent backup; see SQLite backup boundaries. [23]

OFD ownership: a duplicate is not a competitor

Observed result: an independent open was denied the held byte, but a duplicate descriptor succeeded. Closing the original holder did not release the lock while its duplicate remained open. Explicitly unlocking through that duplicate did release it, with both owner descriptors still open.

Hesela executed 12 ordered checks with native F_OFD_SETLK and F_SETLK calls in one Linux process. The table selects seven checkpoints; JSON retains every control and return code. Each request is a nonblocking one-byte write lock. Independent opens refer to the same live file, checked by device/inode pairs. The empty temporary files also make the tested byte ranges extend beyond EOF.

Recorded lock requests: same-byte requests target byte 0; the disjoint control targets byte 1.
Request or preceding eventResult
Independent open, same byteDenied
Independent open, next byteAcquired
Duplicate, same byteAcquired
Independent descriptor closedDenied
Holder closed, duplicate retainedDenied
Final owner descriptor closedAcquired
Explicit unlock via duplicateAcquired

The first three rows compare requests while the initial lock is held. For the next three rows, the requester is the independent peer, not the descriptor just closed. The final row uses a fresh fixture and was preceded by a denied peer request. A successful duplicate request is the same owner reapplying its lock, not evidence of two owners entering independently. The disjoint-byte control succeeded while byte 0 remained locked.

Mixed API control: an OFD lock denied a traditional record-lock request on the very same descriptor; the reverse direction was also denied. Each request succeeded after explicitly releasing the first lock. No blocking wait or deadlock experiment was attempted. Our engineering conclusion is to audit ownership and API compatibility separately: replacing one lock API with another is not automatically a compatible protocol migration. These observations agree with the documented ownership rules. [12]

Recorded 2026-10-16 UTC on Linux 6.8.0-146-generic, x86_64, with cc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0. The stat -f filesystem label was ext2/ext3, not a complete mount description. Download native C source, Python runner and observed JSON with both source hashes. Keep the two source files together and run python3 observe.py on Linux with a C compiler. The runner compiles with warnings treated as errors; unsupported calls fail instead of becoming a successful observation.

This run uses four fresh files under /tmp, unlinks their private names after opening the references, and closes every descriptor. It does not test threads, fork inheritance, blocking fairness, a network filesystem, a database or crash recovery. There is no measured failure rate. As with the ALICE and bounded-testing papers below, the test boundary is part of the result, not a claim of universal correctness.

A failed lock upgrade can discard earlier protection

A stable coordination file does not guarantee continuous ownership while changing lock mode. On local Linux, a conflicting nonblocking flock() shared-to-exclusive conversion can remove the earlier shared lock even while the original descriptor stays open. This is documented conversion behavior, not a newly discovered kernel defect. [11]

Hesela tested three independent native processes using the same API within each case. A and B acquired shared locks; A tried an exclusive conversion; B then unlocked. C tried an exclusive lock and wrote a different four-byte value only when admitted. A finally reacquired shared protection and reread the same file.

Conflict scenario only: six executions per API on one Linux 6.8.0-147-generic system, three repetitions at each of two compiler settings. These are reproduction counts, not estimated failure rates.

APIUpgrade refusedC admitted after B leftChanged data after A reacquired
flock6 / 66 / 66 / 6
F_SETLK6 / 60 / 60 / 6
F_OFD_SETLK6 / 60 / 60 / 6

Controls without an upgrade, with an uncontended successful upgrade, and with shared reacquisition before B unlocked all excluded C. After A's final explicit unlock, C succeeded in every case. Early reacquisition was protected by B and explicit ordering; it does not establish a gap-free reacquisition protocol for arbitrary applications.

The full experiment contains 72 executions on one kernel, preserving ordered calls, process and file identity, return codes, errno and payload reads. The two compiler settings are not two kernels. Generated summary, original -O0 traces, original -O2 traces and file hashes and provenance are available with the complete offline evidence packet. Extract the packet and run python3 -B test_probe.py with Linux, Python 3, cc and coreutils stat; it creates only temporary files and runs fresh native controls.

The reviewed generic Linux implementation removes the old flock record before testing competing locks. The fcntl path checks conflicts before modifying the caller's records. Open-file-description ownership therefore does not imply identical conversion behavior. Upstream v6.8 and v6.17 are source comparisons, not the exact Ubuntu source build or a second tested kernel. Linux v6.8; Linux v6.17.

Design implication: reacquiring a lock after lost protection does not validate an earlier read. Reread or validate the relevant state under the protocol's required lock before acting, and acquire exclusive authority before mutation. Shared reacquisition here is a read witness, not permission to write. Where acceptable, taking exclusive protection before the dependent read avoids this upgrade transition at a possible concurrency cost.

Why crash analysis is a separate test: the OSDI 2014 ALICE study states in section 3.6 that it serializes multithreaded filesystem calls in issue order, relying in most cases on application synchronization. It also requires workload-specific checkers and is not complete. Hesela's inference is that a successful persistence test cannot validate a lock-upgrade protocol whose exclusion was lost; conversely, this lock probe establishes no crash durability. [3, section 3.6]

This connects advisory-lock identity, descriptor lifetime and mode conversion without treating any of them as persistence. It is a local ext4 observation and source synthesis, not a crash test, database-corruption reproduction, NFS/SMB result or universal recommendation to replace flock with record locks. Their other ownership and deadlock distinctions still matter. [12]

Count the bytes before publishing the name

A short write is a positive return smaller than the request. It confirms a prefix, not the entire replacement. For a private temporary file, advance through that prefix and submit the remainder; a later call can fail. Do not publish an incomplete replacement or spin forever on no progress. A direct-I/O error can also leave part of a range modified. [15]

O_APPEND combines end-of-file positioning and each write; it does not combine multiple calls into one record. Our engineering implication: another appender may intervene between a short write and its remainder. Serialize the complete record protocol when required, and handle incomplete records during recovery. Linux also warns that concurrent append simulated on NFS can race. [8]

pwrite takes an explicit position without moving the shared current offset. However, Linux man-pages describes a historical append-mode exception. Library behavior matters: the musl 1.2.6 release announcement reports a correction using RWF_NOAPPEND and returns an error on older kernels rather than silently misplacing the write. [16] [18]

For pwritev2(), RWF_APPEND requests append for that operation; offset -1 also updates the current offset. RWF_NOAPPEND, documented since Linux 6.9, overrides an existing append flag. These are position controls, not persistence requests. Avoid changing a shared open description's flag as an uncoordinated workaround. [17]

Choose placement and cursor behavior separately

The per-call controls RWF_APPEND and RWF_NOAPPEND do not change the shared O_APPEND status flag. In particular, suppressing append does not make offset -1 positional. Linux flag handling; write dispatch.

Documented placement and cursor rules for supported, successful nonempty writes to a seekable regular file, not measured outcomes. The NOAPPEND rows assume the descriptor has O_APPEND set.

Placement and cursor rules
FlagOffset argumentPlacementShared cursor
RWF_APPENDNonnegativeEnd of fileUnchanged
RWF_APPEND-1End of fileUpdated after transfer
RWF_NOAPPENDNonnegativeExplicit offsetUnchanged
RWF_NOAPPEND-1Current offsetUpdated after transfer

Linux v6.17 validates these flags on the operation, not by toggling the shared file description. Its validator rejects both flags together with EINVAL, and rejects suppressing append on an append-only inode with EPERM. RWF_NOAPPEND is not a bypass of append-only inode protection. Flag-validation source.

A zero-total-length write can return before that validation. Therefore an empty call is not a reliable capability probe. Check a nonempty operation on a disposable file, retain the returned byte count and inspect actual placement. EOPNOTSUPP can also reflect an unsupported write path, so it is not uniquely an old-kernel diagnosis. These are source-derived checks, not additional observations from the older experiment below. Linux v6.17 write path.

After a crash, length is not enough. Pillai and colleagues separate an append's file-size update from persistence of its contents (section 2.1). Their ALICE study found that replacing an incompletely persisted appended region with zeros still broke recovery in the affected applications (section 4.4.2). These are historical workload/model results, not a test of RWF_APPEND. Hesela's practical inference: a recovery checker should validate record contents and framing as well as file length; a placement flag alone supplies none of those checks. [3, sections 2.1 and 4.4.2]

Disposable-file observation

Each position probe starts from ABCD, seeks to byte 1 and submits xy. Positional calls also receive explicit offset 1. All three calls in this recorded run returned two bytes; readback is not a durability check.

Sequential Python calls, one fresh file per row. Current offset and write position are different measurements.
CallReadbackCurrent offset
pwriteAxyD1
O_APPEND + writeABCDxy6
O_APPEND + pwriteABCDxy1

A separate child deliberately limits file size to four bytes using RLIMIT_FSIZE. Its six-byte ABCDEF request returned 4; submitting the remaining 2 bytes then failed with EFBIG. Readback was ABCD. The child ignores SIGXFSZ to observe the error and does not change the parent's limits. This is a controlled resource limit, not a disk-failure measurement. [19]

Recorded 2026-10-16 UTC on Python 3.12.3, Linux 6.8.0-146-generic, glibc 2.39; filesystem label ext2/ext3. Download the standalone Python observation and JSON with source SHA-256. Run python3 demo.py on Linux. No concurrent writers, NFS, raw syscall, RWF_NOAPPEND, synchronization or crash recovery were tested. A different runtime may produce a different append-mode positional result.

One vector, a byte count

writev gathers ordered buffers into one call. Its result is a byte count, not a count of completed buffers. A short result may stop inside a buffer. [20] Single-call non-interleaving is a different property from complete submission or post-crash atomicity. [17]

Three fresh child processes; each submits AB and CDEF (six bytes total).
Limit / return (B)ReadbackRemainder
2 / 2ABCDEF
3 / 3ABCDEF
6 / 6ABCDEFNone

The three-byte case consumed AB and only C from the second buffer. Repeating that entire second buffer would duplicate C; the unsubmitted suffix is DEF. Both incomplete cases then failed with EFBIG when retrying under the unchanged limit. The full six-byte case needed no retry. This is byte accounting, not a crash-recovery recipe.

Recorded 2026-10-17 UTC on Linux 6.8.0-146-generic, glibc 2.39, Python 3.12.3. Download the vectored-write probe and measured JSON; run python3 vectored.py. Three child-only size limits, no synchronization, power interruption, concurrent writers or network filesystem. The script records the filesystem label and source hash; labels do not establish mount options.

A scoped replacement sequence

The following is Hesela's engineering synthesis of those API boundaries, not a universal library implementation. Scope: one writer replaces a regular file inside the same, already durable directory on a local Linux filesystem with working file and directory synchronization. The storage stack must honor flush completion.

  1. Create a fresh temporary file in that directory. Write the complete replacement, handle short writes and errors, and set the required file metadata.
  2. Successfully synchronize the temporary file before publishing its name.
  3. Rename that temporary file over the destination and check the result.
  4. Successfully synchronize the containing directory, then acknowledge a durable update to the caller.

This is an ordering argument: prepare the object, persist it, publish its name, persist the name, then acknowledge. Merely placing calls in source-code order is not the same as waiting for their successful completion.

Review checkpoints under the stated assumptions, not an exhaustive catalogue of crash outcomes.
Last completed stageWhat it establishesWhat remains unresolved
Write temporary fileReplacement bytes supplied to the filesystemRequired persistence has not been established
Sync temporary fileFile synchronization completed successfullyThe final destination name has not been committed
Rename over targetThe new target is visible through the namespaceDirectory persistence still needs confirmation
Sync directoryThe scoped protocol's name-persistence boundary completedThe caller may still not have received an acknowledgement

A failed directory sync after rename is not proof that the replacement was rolled back: the new name is already visible. Record an indeterminate durability outcome and reconcile through the application's recovery protocol. Do not silently equate a retry with repair; see why successful fsync retries can mislead.

Cross-directory moves, newly created ancestor directories, concurrent writers, network filesystems and multi-file transactions are outside this sequence. They add state and failure cases that need their own protocol. Replacing an inode also requires an explicit policy for permissions, ownership and other metadata.

Check what directory-sync success means

The sequence above assumes a working directory-synchronization contract. Checking the return code is necessary, but success alone cannot establish what an arbitrary filesystem implementation persisted. Directory synchronization does not by itself guarantee synchronization of every child file's contents. File data and namespace state remain separate responsibilities. [2]

Version-pinned example: Linux v6.12's fuse_dir_fsync() first rejects a bad inode. It then returns success immediately if the connection's no_fsyncdir flag is set. Otherwise it sends FUSE_FSYNCDIR; an ENOSYS result sets that flag and is converted to success. This is separate from regular-file no_fsync handling. [24]

In libfuse 3.16.2, the low-level dispatcher returns ENOSYS when its fsyncdir callback is absent. The callback contract documents that this reply becomes success and suppresses subsequent requests to the filesystem process. This is a version-pinned source review; no mounted FUSE experiment or power-loss test was performed. [25] [26]

Engineering consequence: this path proves neither lost namespace changes nor durable ones. A daemon may persist them by another mechanism. Inspect its implementation and backing-store acknowledgement rules before using directory-sync success as the durable-publication boundary. The separate FUSE writeback and file-sync analysis explains why similarly named operations must not be conflated.

A move between directories changes both namespaces. A recovery protocol must account for persistence of both changes; the one-directory sequence is not a complete cross-directory protocol. Newly created ancestor names add dependencies too. These are scope consequences of the namespace and sync APIs, not a promise that a fixed pair of sync calls makes every filesystem safe. [1] [2]

Why an unsafe shortcut can appear reliable

For the recovery machinery beneath these boundaries, see ext4 journal revocation and interrupted replay.

Ext4 documents auto_da_alloc: for recognized replacement patterns in data=ordered mode, it arranges for delayed-allocation data to reach disk before the rename is committed at the next journal commit. That can prevent a zero-length replacement after a crash. It is a particular allocation and ordering behavior, not a promise that returning from rename means the next commit has already completed. [4]

Pillai and colleagues' BOB study examined six Linux filesystems in sixteen configurations. ALICE separately explored application protocols using abstract persistence models. Section 4.4 distinguishes safe-rename heuristics from safe-file-flush behavior and missing directory synchronization. Their results warn against treating favorable ordering on one configuration as an application guarantee everywhere. They are historical evidence, not a test of today's releases. [3]

There is also a concurrency boundary: section 3.6 says ALICE serializes filesystem calls from multithreaded workloads and does not claim completeness. A persistence-model result therefore does not validate a lock-lifetime protocol or explore every thread interleaving. Our descriptor-close observations address a separate API question, not a reproduction of ALICE. [3]

A crash test needs a recovery oracle

For a worked correctness checker and a comparison of test boundaries, see crash-consistency test oracles and bounds.

Mohan and colleagues' CrashMonkey and Ace work is useful precisely because it states its bounds. The study reproduced 24 of 26 historical unique bugs and found ten new ones. The small-workload observation excludes prerequisite operations from its core-operation count. Testing focuses on explicit persistence points and checks recovered data and metadata, rather than treating successful filesystem repair as sufficient. [5, sections 3-6]

Section 4.4 excludes crashes inside operations and alternative I/O reorderings; resource-exhaustion or long-history bugs can also escape the selected workload space. These results do not prove that a short test validates every crash outcome. [5]

For the replacement above, define the oracle before testing. After an acknowledged update, require the exact new bytes at the intended name with required metadata. Before acknowledgement, specify allowed old/new states and recovery of abandoned temporary files. A crash after persistence but before a reply creates uncertainty for the caller even when the stored version is correct.

  • Record the filesystem, kernel, mount options, cache and flush assumptions, initial directory state and every return value.
  • Test interruption around each protocol boundary in an isolated disposable environment. Include error paths separately from power-loss cases.
  • Inspect recovered storage state and application invariants; an ordinary read after killing only the process may still use the surviving operating-system cache.

Evidence boundary

This article reviews full-text methods and limitations from three papers plus primary API documentation, with explicitly scoped namespace, file-lock, SQLite and write-submission observations. The submission probe imposes a child-only file-size limit. No power interruption, injected device failure, current-kernel certification or reproduction of either paper was performed. The checkpoint table is an explanatory synthesis, not an empirical result or failure-rate estimate. API support and filesystem behavior must be verified for the deployed environment.

Corpus: atomic rename, open file description, directory fsync, persistence ordering, crash consistency. Related: RAID write-hole protection.

Primary sources

  1. Linux man-pages 6.19, rename(2): DESCRIPTION and BUGS.
  2. Linux man-pages 6.19, fsync(2): DESCRIPTION and error handling.
  3. Pillai, Chidambaram, Alagappan, Al-Kiswany, Arpaci-Dusseau and Arpaci-Dusseau. All File Systems Are Not Created Equal: On the Complexity of Crafting Crash-Consistent Applications. OSDI 2014, pp. 433-448, sections 2, 3.6 and 4.4.
  4. Linux kernel documentation, ext4 General Information: auto_da_alloc and Data Mode, retrieved 11 October 2026.
  5. Mohan, Martinez, Ponnapalli, Raju and Chidambaram. Finding Crash-Consistency Bugs with Bounded Black-Box Crash Testing. OSDI 2018, pp. 33-50, sections 3-6.
  6. Linux man-pages 6.19, inode(7): inode numbers, device and link count.
  7. Linux man-pages: open(2), open file descriptions, O_PATH and permission checks
  8. RFC 8881: NFSv4.1 sessions, exactly-once semantics and persistence, sections 2.10.6 and 2.10.6.5.
  9. Linux man-pages 6.19: flock(2), ownership and filesystem differences
  10. Linux man-pages 6.19: fcntl_locking(2), record and open-file-description locks
  11. SQLite: How To Corrupt An SQLite Database File, section 2.2, same-process close and library safeguards
  12. Python 3.12 documentation: fcntl.lockf wrapper and range parameters
  13. Linux man-pages 6.19: write(2), partial writes and errors
  14. Linux man-pages 6.19: pread(2), positional writes and O_APPEND exception
  15. Linux man-pages 6.19: readv(2), RWF_APPEND and RWF_NOAPPEND
  16. musl 1.2.6 release announcement: pwrite correction and older-kernel fallback
  17. Linux man-pages 6.19: getrlimit(2), RLIMIT_FSIZE
  18. Python 3.12 documentation: os.writev, ordered buffers and byte-count return
  19. Gaffney, Prammer, Brasfield, Hipp, Kennedy and Patel. SQLite: Past, Present, and Future. PVLDB 15(12), 3535-3547 (2022), sections 2.1.3, 2.2 and 4.1. DOI: 10.14778/3554821.3554842.
  20. SQLite: PRAGMA integrity_check, documented coverage
  21. SQLite 3.51.0 release, item 17: resistance to application-broken POSIX locks
  22. Linux v6.12: fuse_dir_fsync and no_fsyncdir handling
  23. libfuse 3.16.2: do_fsyncdir and an absent low-level callback
  24. libfuse 3.16.2: low-level fsyncdir callback contract
  25. Linux man-pages: path_resolution(7): lookup components and policies
  26. Linux man-pages: openat2(2): resolve flags and per-open scope
  27. Linux 6.12: Overlay Filesystem, layer lookup, copy-up and directory renames
  28. OCI Image Specification v1.1.1: layer changesets, whiteouts and opaque whiteouts
  29. Linux v6.12: OverlayFS copy-up eligibility, data transfer and truncation
  30. Linux v6.12: build_open_flags, rooted-policy conflicts and cache-only creation/truncation rejection
  31. Linux v6.12 pathname lookup: rename_lock and scoped lookup races
  32. Linux v6.16: VFS dcache and inode objects
  33. Linux v6.16: pathname lookup, cache absence and revalidation
  34. Linux v6.16: unlocked lookup helpers and changing negative dentries
  35. Linux v6.12: cached negative dentries and completion of pathname lookup
  36. Sarma and McKenney, Issues with Selected Scalability Features of the 2.6 Kernel, Linux Symposium 2004, section 5.4
  37. Linux v6.12 pathname lookup: RCU-walk and fallback to REF-walk
  38. Linux v6.8: flock_lock_inode and posix_lock_inode conversion ordering
  39. Linux v6.17: flock_lock_inode and posix_lock_inode conversion ordering
  40. Hesela: ordered native lock-conversion evidence and replay, one Linux kernel
  41. Linux man-pages: name_to_handle_at(2) and open_by_handle_at(2), identity, flags and stale handles
  42. Linux 6.13 documentation: Making Filesystems Exportable, references and filehandle fragments
  43. Linux v6.8: ext4_nfs_get_inode generation validation
  44. Linux v6.8: name_to_handle_at drops the lookup reference; handle reopening resolves the filesystem object again
  45. Linux man-pages: statx(2), unique mount identifier and runtime no-reuse guarantee
  46. Linux v6.17: kiocb_set_rw_flags validation and per-operation append state
  47. Linux v6.17: pwritev2 dispatch, current offsets and zero-length write handling
  48. nfs(5): local_lock and client-local exclusion
  49. mount.cifs(8): nobrl and server byte-range lock requests
  50. Linux kernel: File Locking Release Notes, separate flock and fcntl families
  51. Linux 6.12: Overview of the Linux Virtual File System
  52. Red Hat Enterprise Linux 8: local, network and shared-storage filesystems
  53. Linux 6.12: Tmpfs, virtual-memory storage, swap and unmount behavior
  54. POSIX.1-2017: opendir, search permission and directory read permission
  55. POSIX.1-2017: readdir and concurrent additions or removals
  56. Linux man-pages: mount(2), target location and bind operations
  57. util-linux: mount(8), covered directory contents and repeated attachment
  58. Linux man-pages: proc_pid_mountinfo(5), process scope and fields 4-5
  59. Linux man-pages: mknod(2), device-node creation and device numbers
  60. Linux 6.12 kernel API: character-device registration and file operations
  61. Linux man-pages: null(4), null and zero device behavior
  62. Linux man-pages: lseek(2), device-specific seek support
  63. Linux man-pages: unix(7), local addresses and access rules
  64. Linux man-pages: socket(2), endpoint and framing contracts
  65. Linux man-pages: bind(2), name assignment and cleanup
  66. Linux man-pages: send(2), local completion and errors
  67. Linux man-pages: socketpair(2), connected unnamed endpoints

O_PATH, fsync and symbolic-link APIs rechecked 4 November 2026. Pillai sections 3.1-3.6 and 4.4 rechecked for the distinction between API controls and crash testing. Directory-sync API boundaries, Linux v6.12 and libfuse 3.16.2 source reviewed 25 October 2026. SQLite source documents and Gaffney sections 2.1.3, 2.2 and 4.1 reviewed 21 October 2026. Write-submission APIs and musl release notes reviewed 17 October 2026; lock APIs reviewed 16 October 2026; namespace APIs reviewed 15 October 2026; Pillai section 3.6 and Mohan section 4.4 rechecked 16 October 2026 for test boundaries; the broader paper review is retained from 11 October 2026. Publisher records verify the paper titles, authors, venues and page ranges; no unverified DOI is asserted.

Published by Hesela team · Published · Updated

Report a correction · Editorial standards · Reuse guidance

Change history

: first published.

: latest recorded update. A detailed change note is not available for this revision.

New-publication RSS · Correction RSS

Cite this page
Hesela team. Atomic rename is not a durable commit. Hesela. 2026-11-15. https://hesela.com/analyses/atomic-rename-directory-durability/