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.
Motivation and Context
Many zfs deployments are using multiple pools. However,
ztest
only tests with a single pool. It would be nice to be able to runztest
against multiple pools at the same time to help expose additional issues when multiple pools are in play.Description
Adds support,
ztest --pool-count <poolcount>
for testingztest
with multiple pools.Note that the
--threads
count (default 23) inztest
is per pool.Example
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
How Has This Been Tested?
Ongoing testing with/without multiple pools and using
zloop
Notes for reviewers
Changed
DEFAULT_VDEV_DIR
from"/tmp"
to"/tmp/ztest"
since with multiple pools, the vdev file count can be large.Abstracted the generation of disk path strings under a
make_vdev_path()
.Added
ztest_check_disk_space()
. Since vdev files are initially sparse, make sure there's space for at least half of the vdev size for all the vdevs we instantiate when we start and when we create new vdevs. With multiple pools the leaf vdev file count can grow fast and consume lots of space.Added per-pool runtime state for the child process (does not persist when child process is killed).
An array of these are now stored in the existing
ztest_shared_t
.Still TBD
Types of changes
Checklist:
Signed-off-by
.