ZFS option to verify all writes (did they make it to disk correctly)?
My recent research of my corrupted pool data led me to believe that some writes did not land on disks where requested (this is one of possible disk errors like bitrot and others, that ZFS tries to protect from). Such misdirected writes can strike two (or more) files with one shot: those which did not get the data, and those which were overwritten on the media.
It seems like a worthy RFE to include a pool-wide option to "verify-after-write/commit" - to test that recent TXG sync data has indeed made it to disk on (consumer-grade) hardware into the designated sector numbers.
Perhaps the test should be delayed several seconds after the sync writes (to accomodate for emptying of disk's write cache which can lie about sync writes and/or write ordering).
If the read verifcation fails, currently cached data from recent TXGs can be recovered from on-disk redundancy and/or still exist in RAM cache, and rewritten again (and tested again).
More importantly, a failed test may mean that the write landed on disk randomly, and the pool should be scrubbed ASAP. It may be guessed that the yet-unknown error can lie within "epsilon" tracks (sector numbers) from the currently found non-written data, so if it is possible to scrub just a portion of the pool based on DVAs - that's a preferred start. It is possible that some data can be recovered if it is tended to ASAP (i.e. on mirror, raidz, copies>1; external backups)...