mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-10-26 18:05:04 +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 |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| fsck.zfs.8 | ||
| mount.zfs.8 | ||
| vdev_id.8 | ||
| zdb.8 | ||
| zed.8.in | ||
| zfs_ids_to_path.8 | ||
| zfs_prepare_disk.8.in | ||
| zfs-allow.8 | ||
| zfs-bookmark.8 | ||
| zfs-change-key.8 | ||
| zfs-clone.8 | ||
| zfs-create.8 | ||
| zfs-destroy.8 | ||
| zfs-diff.8 | ||
| zfs-get.8 | ||
| zfs-groupspace.8 | ||
| zfs-hold.8 | ||
| zfs-inherit.8 | ||
| zfs-jail.8 | ||
| zfs-list.8 | ||
| zfs-load-key.8 | ||
| zfs-mount-generator.8.in | ||
| zfs-mount.8 | ||
| zfs-program.8 | ||
| zfs-project.8 | ||
| zfs-projectspace.8 | ||
| zfs-promote.8 | ||
| zfs-receive.8 | ||
| zfs-recv.8 | ||
| zfs-redact.8 | ||
| zfs-release.8 | ||
| zfs-rename.8 | ||
| zfs-rollback.8 | ||
| zfs-send.8 | ||
| zfs-set.8 | ||
| zfs-share.8 | ||
| zfs-snapshot.8 | ||
| zfs-unallow.8 | ||
| zfs-unjail.8 | ||
| zfs-unload-key.8 | ||
| zfs-unmount.8 | ||
| zfs-unzone.8 | ||
| zfs-upgrade.8 | ||
| zfs-userspace.8 | ||
| zfs-wait.8 | ||
| zfs-zone.8 | ||
| zfs.8 | ||
| zgenhostid.8 | ||
| zinject.8 | ||
| zpool_influxdb.8 | ||
| zpool-add.8 | ||
| zpool-attach.8 | ||
| zpool-checkpoint.8 | ||
| zpool-clear.8 | ||
| zpool-create.8 | ||
| zpool-ddtprune.8 | ||
| zpool-destroy.8 | ||
| zpool-detach.8 | ||
| zpool-events.8 | ||
| zpool-export.8 | ||
| zpool-get.8 | ||
| zpool-history.8 | ||
| zpool-import.8 | ||
| zpool-initialize.8 | ||
| zpool-iostat.8 | ||
| zpool-labelclear.8 | ||
| zpool-list.8 | ||
| zpool-offline.8 | ||
| zpool-online.8 | ||
| zpool-prefetch.8 | ||
| zpool-reguid.8 | ||
| zpool-remove.8 | ||
| zpool-reopen.8 | ||
| zpool-replace.8 | ||
| zpool-resilver.8 | ||
| zpool-scrub.8 | ||
| zpool-set.8 | ||
| zpool-split.8 | ||
| zpool-status.8 | ||
| zpool-sync.8 | ||
| zpool-trim.8 | ||
| zpool-upgrade.8 | ||
| zpool-wait.8 | ||
| zpool.8 | ||
| zstream.8 | ||
| zstreamdump.8 | ||