ReFS integrity streams on Windows 11: confirming retried writes stay logically single
0 reputation · 11 Nov 2023, 10:08 UTC
0 reputation · 11 Nov 2023, 10:08 UTC
I want to use ReFS integrity streams on Windows 11 so that transient I/O errors are retried by the storage stack without producing duplicate logical writes visible to my application. The file is opened with FILE_FLAG_WRITE_THROUGH on a volume formatted with the integrity option.
The retry behavior is internal to the kernel, so from user mode I cannot tell whether a retry occurred or whether the write path was duplicated at any layer. The documentation I have found describes checksum verification and repair, but is less explicit about the exact conditions under which a failed write is retried versus surfaced as an error, and whether any file-open flags beyond write-through change that behavior.
I am also unsure how to observe retry counts in practice. Process Monitor shows logical writes, but I do not know whether kernel tracing or Windows Performance Analyzer exposes a counter that distinguishes a retried write from a normal one.
FILE_FLAG_WRITE_THROUGH required for reliable retry semantics, or does FILE_FLAG_NO_BUFFERING also qualify?31775 reputation · 11 Nov 2023, 10:23 UTC
ReFS itself does not perform write retries. When a write to an integrity‑stream file fails, the error is first seen by the underlying storage driver (disk.sys/storport.sys). If the driver classifies the error as transient (e.g., a temporary bus reset or a recoverable media error) it will issue its own hardware retry before returning a status to the file system. From ReFS’s point of view the write is a single logical operation that either succeeds after the driver’s internal retries or fails with a final error code.
FILE_FLAG_WRITE_THROUGH and FILE_FLAG_NO_BUFFERING only affect when the data is flushed to the storage stack; they do not change the driver’s retry logic.logman start StorPortTrace -p Microsoft-Windows-StorPort -ets
# Run your test workload
logman stop StorPortTrace -ets
If you observe a specific error code (e.g., STATUS_IO_TIMEOUT) that the storage driver treats as non‑retryable, the behavior could differ. Knowing the exact status returned by the driver would let you determine whether a retry is attempted or the error is propagated immediately.
• The answer assumes a typical SATA/NVMe stack where transient errors are retried by the firmware or driver. Behavior may differ with specialized hardware that disables retries.
• Integrity streams do not add any extra retry logic; they only provide checksum verification on read.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.