mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-11-19 11:25:28 +03:00
This fixes an oversight in the Direct I/O PR. There is nothing that stops a process from manipulating the contents of a buffer for a Direct I/O read while the I/O is in flight. This can lead checksum verify failures. However, the disk contents are still correct, and this would lead to false reporting of checksum validation failures. To remedy this, all Direct I/O reads that have a checksum verification failure are treated as suspicious. In the event a checksum validation failure occurs for a Direct I/O read, then the I/O request will be reissued though the ARC. This allows for actual validation to happen and removes any possibility of the buffer being manipulated after the I/O has been issued. Just as with Direct I/O write checksum validation failures, Direct I/O read checksum validation failures are reported though zpool status -d in the DIO column. Also the zevent has been updated to have both: 1. dio_verify_wr -> Checksum verification failure for writes 2. dio_verify_rd -> Checksum verification failure for reads. This allows for determining what I/O operation was the culprit for the checksum verification failure. All DIO errors are reported only on the top-level VDEV. Even though FreeBSD can write protect pages (stable pages) it still has the same issue as Linux with Direct I/O reads. This commit updates the following: 1. Propogates checksum failures for reads all the way up to the top-level VDEV. 2. Reports errors through zpool status -d as DIO. 3. Has two zevents for checksum verify errors with Direct I/O. One for read and one for write. 4. Updates FreeBSD ABD code to also check for ABD_FLAG_FROM_PAGES and handle ABD buffer contents validation the same as Linux. 5. Updated manipulate_user_buffer.c to also manipulate a buffer while a Direct I/O read is taking place. 6. Adds a new ZTS test case dio_read_verify that stress tests the new code. 7. Updated man pages. 8. Added an IMPLY statement to zio_checksum_verify() to make sure that Direct I/O reads are not issued as speculative. 9. Removed self healing through mirror, raidz, and dRAID VDEVs for Direct I/O reads. This issue was first observed when installing a Windows 11 VM on a ZFS dataset with the dataset property direct set to always. The zpool devices would report checksum failures, but running a subsequent zpool scrub would not repair any data and report no errors. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Brian Atkinson <batkinson@lanl.gov> Closes #16598 |
||
|---|---|---|
| .. | ||
| abd.c | ||
| aggsum.c | ||
| arc.c | ||
| blake3_zfs.c | ||
| blkptr.c | ||
| bplist.c | ||
| bpobj.c | ||
| bptree.c | ||
| bqueue.c | ||
| brt.c | ||
| btree.c | ||
| dataset_kstats.c | ||
| dbuf_stats.c | ||
| dbuf.c | ||
| ddt_log.c | ||
| ddt_stats.c | ||
| ddt_zap.c | ||
| ddt.c | ||
| dmu_diff.c | ||
| dmu_direct.c | ||
| dmu_object.c | ||
| dmu_objset.c | ||
| dmu_recv.c | ||
| dmu_redact.c | ||
| dmu_send.c | ||
| dmu_traverse.c | ||
| dmu_tx.c | ||
| dmu_zfetch.c | ||
| dmu.c | ||
| dnode_sync.c | ||
| dnode.c | ||
| dsl_bookmark.c | ||
| dsl_crypt.c | ||
| dsl_dataset.c | ||
| dsl_deadlist.c | ||
| dsl_deleg.c | ||
| dsl_destroy.c | ||
| dsl_dir.c | ||
| dsl_pool.c | ||
| dsl_prop.c | ||
| dsl_scan.c | ||
| dsl_synctask.c | ||
| dsl_userhold.c | ||
| edonr_zfs.c | ||
| fm.c | ||
| gzip.c | ||
| hkdf.c | ||
| lz4_zfs.c | ||
| lz4.c | ||
| lzjb.c | ||
| metaslab.c | ||
| mmp.c | ||
| multilist.c | ||
| objlist.c | ||
| pathname.c | ||
| range_tree.c | ||
| refcount.c | ||
| rrwlock.c | ||
| sa.c | ||
| sha2_zfs.c | ||
| skein_zfs.c | ||
| spa_checkpoint.c | ||
| spa_config.c | ||
| spa_errlog.c | ||
| spa_history.c | ||
| spa_log_spacemap.c | ||
| spa_misc.c | ||
| spa_stats.c | ||
| spa.c | ||
| space_map.c | ||
| space_reftree.c | ||
| THIRDPARTYLICENSE.cityhash | ||
| THIRDPARTYLICENSE.cityhash.descrip | ||
| txg.c | ||
| uberblock.c | ||
| unique.c | ||
| vdev_draid_rand.c | ||
| vdev_draid.c | ||
| vdev_indirect_births.c | ||
| vdev_indirect_mapping.c | ||
| vdev_indirect.c | ||
| vdev_initialize.c | ||
| vdev_label.c | ||
| vdev_mirror.c | ||
| vdev_missing.c | ||
| vdev_queue.c | ||
| vdev_raidz_math_aarch64_neon_common.h | ||
| vdev_raidz_math_aarch64_neon.c | ||
| vdev_raidz_math_aarch64_neonx2.c | ||
| vdev_raidz_math_avx2.c | ||
| vdev_raidz_math_avx512bw.c | ||
| vdev_raidz_math_avx512f.c | ||
| vdev_raidz_math_impl.h | ||
| vdev_raidz_math_powerpc_altivec_common.h | ||
| vdev_raidz_math_powerpc_altivec.c | ||
| vdev_raidz_math_scalar.c | ||
| vdev_raidz_math_sse2.c | ||
| vdev_raidz_math_ssse3.c | ||
| vdev_raidz_math.c | ||
| vdev_raidz.c | ||
| vdev_rebuild.c | ||
| vdev_removal.c | ||
| vdev_root.c | ||
| vdev_trim.c | ||
| vdev.c | ||
| zap_leaf.c | ||
| zap_micro.c | ||
| zap.c | ||
| zcp_get.c | ||
| zcp_global.c | ||
| zcp_iter.c | ||
| zcp_set.c | ||
| zcp_synctask.c | ||
| zcp.c | ||
| zfeature.c | ||
| zfs_byteswap.c | ||
| zfs_chksum.c | ||
| zfs_fm.c | ||
| zfs_fuid.c | ||
| zfs_impl.c | ||
| zfs_ioctl.c | ||
| zfs_log.c | ||
| zfs_onexit.c | ||
| zfs_quota.c | ||
| zfs_ratelimit.c | ||
| zfs_replay.c | ||
| zfs_rlock.c | ||
| zfs_sa.c | ||
| zfs_vnops.c | ||
| zfs_znode.c | ||
| zil.c | ||
| zio_checksum.c | ||
| zio_compress.c | ||
| zio_inject.c | ||
| zio.c | ||
| zle.c | ||
| zrlock.c | ||
| zthr.c | ||
| zvol.c | ||