if (vd->vdev_ops->vdev_op_leaf && vdev_readable(vd)) {
uint64_t aux_guid = 0;
nvlist_t *nvl;
+ uint64_t txg = strict ? spa->spa_config_txg : -1ULL;
- if ((label = vdev_label_read_config(vd, VDEV_BEST_LABEL)) ==
- NULL) {
+ if ((label = vdev_label_read_config(vd, txg)) == NULL) {
vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
VDEV_AUX_BAD_LABEL);
return (0);
!l2arc_vdev_present(vd))
l2arc_add_vdev(spa, vd);
} else {
- (void) vdev_validate(vd, B_TRUE);
+ (void) vdev_validate(vd, spa_last_synced_txg(spa));
}
/*
if (!vdev_readable(vd))
return (0);
- if ((label = vdev_label_read_config(vd, VDEV_BEST_LABEL)) == NULL) {
+ if ((label = vdev_label_read_config(vd, -1ULL)) == NULL) {
vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
VDEV_AUX_CORRUPT_DATA);
return (-1);