mirror_zfs/man/man8
Brian Atkinson b4e4cbeb20
Always validate checksums for Direct I/O reads
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
2024-10-09 12:28:08 -07:00
..
.gitignore Add zfs_prepare_disk script for disk firmware install 2023-09-21 08:36:26 -07:00
fsck.zfs.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
mount.zfs.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
vdev_id.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zdb.8 Fix a mis-merge in the zdb man page (#16304) 2024-06-28 10:38:22 -07:00
zed.8.in Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zfs_ids_to_path.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_prepare_disk.8.in Add zfs_prepare_disk script for disk firmware install 2023-09-21 08:36:26 -07:00
zfs-allow.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zfs-bookmark.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs-change-key.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-clone.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs-create.8 zfs-create(8): ZFS for swap: caution, clarity 2023-06-02 11:25:13 -07:00
zfs-destroy.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs-diff.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs-get.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-groupspace.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-hold.8 Adds the -p option to zfs holds 2022-11-08 10:08:21 -08:00
zfs-inherit.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-jail.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zfs-list.8 JSON output support for zfs list 2024-08-06 12:46:34 -07:00
zfs-load-key.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zfs-mount-generator.8.in Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zfs-mount.8 JSON output support zfs mount 2024-08-06 12:46:40 -07:00
zfs-program.8 Add zfs.sync.snapshot_rename 2022-09-02 13:31:19 -07:00
zfs-project.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zfs-projectspace.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-promote.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zfs-receive.8 Improve tests and update man page for healing recv 2023-03-15 10:34:10 -07:00
zfs-recv.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-redact.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-release.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-rename.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs-rollback.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs-send.8 feature: large_microzap 2024-10-02 20:47:11 -07:00
zfs-set.8 JSON output support for zfs version and zfs get 2024-08-06 12:45:45 -07:00
zfs-share.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs-snapshot.8 Update zfs-snapshot.8 2024-02-08 13:06:12 -08:00
zfs-unallow.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unjail.8 Add FreeBSD jail support hooks 2019-12-11 11:58:37 -08:00
zfs-unload-key.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unmount.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unzone.8 Add Linux namespace delegation support 2022-06-10 09:51:46 -07:00
zfs-upgrade.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs-userspace.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zfs-wait.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs-zone.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs.8 JSON output support for zfs version and zfs get 2024-08-06 12:45:45 -07:00
zgenhostid.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zinject.8 Parallel pool import 2024-04-22 09:42:38 -07:00
zpool_influxdb.8 Consistentify miscellaneous style on remaining manpages 2021-06-09 14:35:53 -07:00
zpool-add.8 Add ashift validation when adding devices to a pool 2024-03-29 13:15:56 -06:00
zpool-attach.8 RAID-Z expansion feature 2023-11-08 10:19:41 -08:00
zpool-checkpoint.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool-clear.8 vdev probe to slow disk can stall mmp write checker 2024-04-29 14:35:53 -07:00
zpool-create.8 Remove unnecessary commas in zpool-create.8 2023-06-27 16:58:32 -07:00
zpool-ddtprune.8 Add DDT prune command 2024-09-04 14:17:02 -07:00
zpool-destroy.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool-detach.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool-events.8 Always validate checksums for Direct I/O reads 2024-10-09 12:28:08 -07:00
zpool-export.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zpool-get.8 JSON output support for zpool get 2024-08-06 12:47:00 -07:00
zpool-history.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool-import.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool-initialize.8 Add the ability to uninitialize 2023-05-18 10:02:20 -07:00
zpool-iostat.8 Update man pages to time(1) from time(2) 2024-01-29 09:44:08 -08:00
zpool-labelclear.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool-list.8 JSON output support for zpool list 2024-08-06 12:47:04 -07:00
zpool-offline.8 zpool: Add slot power control, print power status 2023-12-21 10:53:16 -08:00
zpool-online.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-prefetch.8 ddt: add support for prefetching tables into the ARC 2024-07-26 09:16:18 -07:00
zpool-reguid.8 zpool: Provide GUID to zpool-reguid(8) with -g (#16239) 2024-08-26 09:27:24 -07:00
zpool-remove.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zpool-reopen.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool-replace.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool-resilver.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zpool-scrub.8 Do not report bytes skipped by scan as issued. 2023-06-30 08:47:13 -07:00
zpool-set.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-split.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zpool-status.8 Always validate checksums for Direct I/O reads 2024-10-09 12:28:08 -07:00
zpool-sync.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool-trim.8 Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool-upgrade.8 Ubuntu 22.04 integration: mancheck 2022-11-18 11:26:41 -08:00
zpool-wait.8 Update man pages to time(1) from time(2) 2024-01-29 09:44:08 -08:00
zpool.8 Add DDT prune command 2024-09-04 14:17:02 -07:00
zstream.8 Add ability to recompress send streams with new compression algorithm 2022-11-10 15:23:46 -08:00
zstreamdump.8 zstreamdump: replace with link to zstream 2021-05-21 10:16:14 -07:00