Skip to content

Commit

Permalink
Fix "zpool get guid,freeing,leaked" source
Browse files Browse the repository at this point in the history
`zpool get guid,freeing,leaked` shows SOURCE as `default`, it should be `-` as those props are not editable.

Changed code to not overwrite `src` for `ZPOOL_PROP_VERSION`, so it stays `ZPROP_SRC_NONE`.
  • Loading branch information
dasjoe committed Jan 5, 2016
1 parent 0743485 commit d9c8d22
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions module/zfs/spa.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,13 @@ spa_prop_get_config(spa_t *spa, nvlist_t **nvp)
rvd->vdev_state, src);

version = spa_version(spa);
if (version == zpool_prop_default_numeric(ZPOOL_PROP_VERSION))
src = ZPROP_SRC_DEFAULT;
else
src = ZPROP_SRC_LOCAL;
spa_prop_add_list(*nvp, ZPOOL_PROP_VERSION, NULL, version, src);
if (version == zpool_prop_default_numeric(ZPOOL_PROP_VERSION)) {
spa_prop_add_list(*nvp, ZPOOL_PROP_VERSION, NULL, version,
ZPROP_SRC_DEFAULT);
} else {
spa_prop_add_list(*nvp, ZPOOL_PROP_VERSION, NULL, version,
ZPROP_SRC_LOCAL);
}
}

if (pool != NULL) {
Expand Down

0 comments on commit d9c8d22

Please sign in to comment.