Skip to content
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

fix kstat state update during pool transition #8746

Merged
merged 2 commits into from
May 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions module/zfs/spa_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2582,8 +2582,18 @@ spa_set_missing_tvds(spa_t *spa, uint64_t missing)
const char *
spa_state_to_name(spa_t *spa)
{
vdev_state_t state = spa->spa_root_vdev->vdev_state;
vdev_aux_t aux = spa->spa_root_vdev->vdev_stat.vs_aux;
ASSERT3P(spa, !=, NULL);

/*
* it is possible for the spa to exist, without root vdev
* as the spa transitions during import/export
*/
vdev_t *rvd = spa->spa_root_vdev;
if (rvd == NULL) {
return ("TRANSITIONING");
}
richardelling marked this conversation as resolved.
Show resolved Hide resolved
vdev_state_t state = rvd->vdev_state;
vdev_aux_t aux = rvd->vdev_stat.vs_aux;

if (spa_suspended(spa) &&
(spa_get_failmode(spa) != ZIO_FAILURE_MODE_CONTINUE))
Expand Down