forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add raidz expansion to ztest #12
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1d6b312
Add raidz expansion test to ztest, fix vdev_raidz_load() bug, cstyle …
stuartmaybee 44c2a6c
Merge branch 'raidz' of https://github.com/ahrens/zfs into raidz
stuartmaybee 34666ff
Add new arg to spa_vdev_attach() call
stuartmaybee 55abf89
Address comments from Matt on the raidz expand thest changes.
stuartmaybee f54144c
Merge branch 'raidz' of https://github.com/ahrens/zfs into raidz
stuartmaybee c3ccf7c
Fix cstyle
stuartmaybee 11a742d
Fix issue where attach to raidz (expand) accepts nonsense parity spec.
stuartmaybee 76fe8c9
Fix issue where 2nd raidz expand allowed while 1st expand still in pr…
stuartmaybee 96c3b08
PR comments addressed, use spa_raidz_expand rather than adding a flag
stuartmaybee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we use
spa_raidz_expand != NULL
, rather than adding a new field? Are they set/cleared at different times? It looks to me likespa_raidz_expand
andspa_raidz_expanding
are both set while the namespace lock is held, so don't think there's any race condition when the expansion starts.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because since the spa_raidz_expand pointer is set in Syncing context which is run in a different task AIUI. we would have a race where we could exit here and another expand request could get in here and also start an expand before the pointer gets set. I wanted to use the pointer setting but this seemed better. (Unless I am misunderstanding how things work)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah so it happens via:
which means that it will happen when that txg is synced. Which we wait for with the call to
spa_vdev_exit(spa, newrootvd, dtl_max_txg, 0);
. It looks like this all happens while holding thespa_namespace_lock
, so another removal couldn't be initiated before we setspa_raidz_expand
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I missed that spa_vdev_exit() waited till the TXG is finished. That makes it simpler, will change to use the expand pointer.