MFV r246388:
Import vendor bugfixes Illumos ZFS issues: 3422 zpool create/syseventd race yield non-importable pool 3425 first write to a new zvol can fail with EFBIG References: https://www.illumos.org/issues/3422 https://www.illumos.org/issues/3425 MFC after: 2 weeks
This commit is contained in:
commit
fd9778c236
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246631
@ -526,13 +526,12 @@ get_configs(libzfs_handle_t *hdl, pool_list_t *pl, boolean_t active_ok)
|
|||||||
* version
|
* version
|
||||||
* pool guid
|
* pool guid
|
||||||
* name
|
* name
|
||||||
* pool txg (if available)
|
|
||||||
* comment (if available)
|
* comment (if available)
|
||||||
* pool state
|
* pool state
|
||||||
* hostid (if available)
|
* hostid (if available)
|
||||||
* hostname (if available)
|
* hostname (if available)
|
||||||
*/
|
*/
|
||||||
uint64_t state, version, pool_txg;
|
uint64_t state, version;
|
||||||
char *comment = NULL;
|
char *comment = NULL;
|
||||||
|
|
||||||
version = fnvlist_lookup_uint64(tmp,
|
version = fnvlist_lookup_uint64(tmp,
|
||||||
@ -548,11 +547,6 @@ get_configs(libzfs_handle_t *hdl, pool_list_t *pl, boolean_t active_ok)
|
|||||||
fnvlist_add_string(config,
|
fnvlist_add_string(config,
|
||||||
ZPOOL_CONFIG_POOL_NAME, name);
|
ZPOOL_CONFIG_POOL_NAME, name);
|
||||||
|
|
||||||
if (nvlist_lookup_uint64(tmp,
|
|
||||||
ZPOOL_CONFIG_POOL_TXG, &pool_txg) == 0)
|
|
||||||
fnvlist_add_uint64(config,
|
|
||||||
ZPOOL_CONFIG_POOL_TXG, pool_txg);
|
|
||||||
|
|
||||||
if (nvlist_lookup_string(tmp,
|
if (nvlist_lookup_string(tmp,
|
||||||
ZPOOL_CONFIG_COMMENT, &comment) == 0)
|
ZPOOL_CONFIG_COMMENT, &comment) == 0)
|
||||||
fnvlist_add_string(config,
|
fnvlist_add_string(config,
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2012 by Delphix. All rights reserved.
|
* Copyright (c) 2013 by Delphix. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/dmu.h>
|
#include <sys/dmu.h>
|
||||||
@ -284,6 +284,7 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
|
|||||||
delta = P2NPHASE(off, dn->dn_datablksz);
|
delta = P2NPHASE(off, dn->dn_datablksz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
min_ibs = max_ibs = dn->dn_indblkshift;
|
||||||
if (dn->dn_maxblkid > 0) {
|
if (dn->dn_maxblkid > 0) {
|
||||||
/*
|
/*
|
||||||
* The blocksize can't change,
|
* The blocksize can't change,
|
||||||
@ -291,13 +292,6 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
|
|||||||
*/
|
*/
|
||||||
ASSERT(dn->dn_datablkshift != 0);
|
ASSERT(dn->dn_datablkshift != 0);
|
||||||
min_bs = max_bs = dn->dn_datablkshift;
|
min_bs = max_bs = dn->dn_datablkshift;
|
||||||
min_ibs = max_ibs = dn->dn_indblkshift;
|
|
||||||
} else if (dn->dn_indblkshift > max_ibs) {
|
|
||||||
/*
|
|
||||||
* This ensures that if we reduce DN_MAX_INDBLKSHIFT,
|
|
||||||
* the code will still work correctly on older pools.
|
|
||||||
*/
|
|
||||||
min_ibs = max_ibs = dn->dn_indblkshift;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1334,7 +1334,8 @@ vdev_validate(vdev_t *vd, boolean_t strict)
|
|||||||
if (vd->vdev_ops->vdev_op_leaf && vdev_readable(vd)) {
|
if (vd->vdev_ops->vdev_op_leaf && vdev_readable(vd)) {
|
||||||
uint64_t aux_guid = 0;
|
uint64_t aux_guid = 0;
|
||||||
nvlist_t *nvl;
|
nvlist_t *nvl;
|
||||||
uint64_t txg = strict ? spa->spa_config_txg : -1ULL;
|
uint64_t txg = spa_last_synced_txg(spa) != 0 ?
|
||||||
|
spa_last_synced_txg(spa) : -1ULL;
|
||||||
|
|
||||||
if ((label = vdev_label_read_config(vd, txg)) == NULL) {
|
if ((label = vdev_label_read_config(vd, txg)) == NULL) {
|
||||||
vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
|
vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
|
||||||
@ -1521,7 +1522,7 @@ vdev_reopen(vdev_t *vd)
|
|||||||
!l2arc_vdev_present(vd))
|
!l2arc_vdev_present(vd))
|
||||||
l2arc_add_vdev(spa, vd);
|
l2arc_add_vdev(spa, vd);
|
||||||
} else {
|
} else {
|
||||||
(void) vdev_validate(vd, spa_last_synced_txg(spa));
|
(void) vdev_validate(vd, B_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user