Fix two issues with dynamic gang headers#17587
Closed
pcd1193182 wants to merge 2 commits intoopenzfs:masterfrom
Closed
Fix two issues with dynamic gang headers#17587pcd1193182 wants to merge 2 commits intoopenzfs:masterfrom
pcd1193182 wants to merge 2 commits intoopenzfs:masterfrom
Conversation
Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc.
behlendorf
approved these changes
Aug 1, 2025
Contributor
behlendorf
left a comment
There was a problem hiding this comment.
That's subtle, but the fix makes good sense. As does extending the test case to cover raidz and draid.
amotin
approved these changes
Aug 1, 2025
amotin
reviewed
Aug 4, 2025
Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc.
amotin
approved these changes
Aug 4, 2025
behlendorf
pushed a commit
that referenced
this pull request
Aug 6, 2025
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes #17587
spauka
pushed a commit
to spauka/zfs
that referenced
this pull request
Aug 30, 2025
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes openzfs#17587
spauka
pushed a commit
to spauka/zfs
that referenced
this pull request
Aug 30, 2025
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes openzfs#17587
pcd1193182
added a commit
to KlaraSystems/zfs
that referenced
this pull request
Nov 13, 2025
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes openzfs#17587
pcd1193182
added a commit
to KlaraSystems/zfs
that referenced
this pull request
Nov 13, 2025
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes openzfs#17587
lundman
pushed a commit
to openzfsonosx/openzfs-fork
that referenced
this pull request
Jan 30, 2026
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes openzfs#17587
lundman
pushed a commit
to openzfsonosx/openzfs-fork
that referenced
this pull request
Jan 30, 2026
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes openzfs#17587
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this pull request
Feb 23, 2026
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes openzfs#17587
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this pull request
Feb 23, 2026
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes openzfs#17587
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sponsored by: [Klara, Inc.; Wasabi Technology, Inc.]
Motivation and Context
When running some tests on a heavily fragmented system using raidz, I noticed a large number of checksum errors. I investigated, and determined that these were occurring when gang blocks were created. I modified the gang block tests to use raidz instead of plain vdevs, and the issue occurred in the tests immediately.
Description
First, there are test changes to better test more configurations. Most of the test changes are just indentation, but the calls to
check_not_gang_dvahave been replaced with calls to the new functionscheck_gang_bpandcheck_not_gang_bprespectively, which is what should actually have been tested there.Next, there is a fix in zio_checksum.c for the case where there are more intermediate ZIOs between the one being checksummed and the gang header. This occurred in mirror devices in my testing, but would also occur if you had raidz devices being replaced, or possibly indirect vdevs.
Finally, there is a fix in zio.c for the raidz code. The problem we were running into in that case is that we were using the asize of the whole allocation used by the gang header as the psize of the IO, which resulted in an even larger read/write being done. We need to convert back down from the gang_header_asize to the actual psize that write provides.
How Has This Been Tested?
Ran the updated gang block tests, verified that on the original system where I saw the issue this prevented checksum errors from occurring.
Types of changes
Checklist:
Signed-off-by.