TECHNOLOGY

A later successful fsync does not erase an earlier writeback error

In this article
THE QUICK TAKE

An advanced error cursor explains why an error need not repeat; recovery still needs evidence that the intended data was rewritten and validated.

The second synchronization returns success

A checkpoint writer receives a writeback error from synchronization, immediately retries and receives success. Accepting the checkpoint solely from the second result loses the evidence that the first synchronization reported failed storage work. Success can reflect error-reporting state rather than repaired bytes.

The VFS writeback documentation explains that, after an error has been reported, later synchronization requests on the same file description can return success unless further writeback errors occur. Repetition is not the contract for preserving the original failure.

Understand the cursor, not just the errno

The errseq reference describes watchers that sample an error sequence and later check and advance their cursor. They can learn that an error occurred since the sample, but not reconstruct a complete count or history of every failure.

Advancing the cursor does not repeat the failed application write. It changes what error state has already been observed. A retry loop that stops at the first success must therefore keep the checkpoint generation marked uncertain until a separate recovery action establishes its contents.

Keep file descriptions and writers visible

The generic VFS machinery does not track which file description dirtied every individual page. It reports writeback errors to file descriptions open when the error occurred. A reader or writer receiving an error is not automatically the unique origin of the failed data.

Preserve which processes and open file descriptions participated, including shared descriptors where relevant. Do not count repeated reports from different descriptions as independent device incidents or use the absence of a repeated report as proof that another writer’s data is safe.

Define recovery after the first failure

Stop publication of the affected checkpoint and retain the first error with its generation identity. Decide whether the application can reconstruct and rewrite a complete new generation or must fall back to an earlier verified one. Reopening the file merely to obtain a fresh synchronization result is not data recovery.

A controlled negative fixture can verify that the application’s error path does not publish an uncertain generation. Such testing belongs in an isolated environment; the review itself need not damage storage or inject errors into live checkpoint files.

Acceptance requires content evidence

After an approved rewrite or restore, validate the intended component set and application state. Preserve the relationship between the original failure, the chosen corrective action and the newly accepted generation. A later successful fsync contributes to that record but cannot replace it.

File and directory synchronization explains the separate publication-ordering requirements. Checkpoint consistency explains why apparently present files are insufficient evidence of a coherent recovery state.

Preserve uncertainty rather than clearing the symptom

An error cursor is a reporting mechanism, not a storage-health certificate. Filesystem-specific implementations can also differ from the generic mechanism described here. Record the actual filesystem and kernel behavior and retain unresolved uncertainty. The useful endpoint is a verified checkpoint selected by an explicit recovery decision, with the first writeback failure still visible in the incident history.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles