-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. When testing out installing a VM with virtual manager on Linux and a dataset with direct=always, there an ASSERT failure in abd_alloc_from_pages(). Originally zfs_setup_direct() did an alignment check of the UIO using SPA_MINBLOCKSIZE with zfs_uio_aligned(). The idea behind this was maybe the page alignment restriction could be changed to use ashift as the alignment check in the future. Howver, this diea never came to be. The alignment restrictions for Direct I/O are based on PAGE_SIZE. Updating the check zfs_setup_direct() for the UIO to use PAGE_SIZE fixed the issue. 2. Updated other alignment check in dmu_read_impl() to also use PAGE_SIZE. 3. As a consequence of updating the UIO alignment checks the ZTS test case dio_unaligned_filesize began to fail. This is because there was no way to detect reading past the end of the file before issue EINVAL in the ZPL and VOPs layers in FreeBSD. This was resolved by moving zfs_setup_direct() into zfs_write() and zfs_read(). This allows for other error checking to take place before checking any Direct I/O limitations. Updating the call site of zfs_setup_direct() did require a bit of changes to the logic in that function but it mostly remained the same. 4. Upated the checksum verify module parameter for Direct I/O writes to only be a boolean and return EIO in the event a checksum verify failure occurs. By default, this module parameter is set to 1 for Linux and 0 for FreeBSD. The module parameter has been changed to zfs_vdev_direct_write_verify. There are still counters on the top-level VDEV for checksum verify failures, but this could be removed. It would still be good to to leave the ZED event dio_verify for checksum failures as a notification that an application was manipulating the contents of a buffer after issuing that buffer with for I/O using Direct I/O. As part of this cahnge, man pages were updated, the ZTS test case dio_writy_verify was updated, and all comments relating to the module parameter were udpated as well. Signed-off-by: Brian Atkinson <[email protected]>
- Loading branch information
1 parent
dde7272
commit c4e226f
Showing
33 changed files
with
172 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.