Mercurial > illumos > illumos-gate
changeset 13934:9e23a7f7b812
3422 zpool create/syseventd race yield non-importable pool
3425 first write to a new zvol can fail with EFBIG
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
author | George Wilson <george.wilson@delphix.com> |
---|---|
date | Wed, 30 Jan 2013 12:01:51 -0800 |
parents | fd23dcf25ebb |
children | 79a93e2adfec |
files | usr/src/lib/libzfs/common/libzfs_import.c usr/src/uts/common/fs/zfs/dmu_tx.c usr/src/uts/common/fs/zfs/vdev.c |
diffstat | 3 files changed, 6 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libzfs/common/libzfs_import.c Wed Jan 30 10:55:11 2013 -0800 +++ b/usr/src/lib/libzfs/common/libzfs_import.c Wed Jan 30 12:01:51 2013 -0800 @@ -528,13 +528,12 @@ * version * pool guid * name - * pool txg (if available) * comment (if available) * pool state * hostid (if available) * hostname (if available) */ - uint64_t state, version, pool_txg; + uint64_t state, version; char *comment = NULL; version = fnvlist_lookup_uint64(tmp, @@ -550,11 +549,6 @@ fnvlist_add_string(config, 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, ZPOOL_CONFIG_COMMENT, &comment) == 0) fnvlist_add_string(config,
--- a/usr/src/uts/common/fs/zfs/dmu_tx.c Wed Jan 30 10:55:11 2013 -0800 +++ b/usr/src/uts/common/fs/zfs/dmu_tx.c Wed Jan 30 12:01:51 2013 -0800 @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. 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> @@ -284,6 +284,7 @@ delta = P2NPHASE(off, dn->dn_datablksz); } + min_ibs = max_ibs = dn->dn_indblkshift; if (dn->dn_maxblkid > 0) { /* * The blocksize can't change, @@ -291,13 +292,6 @@ */ ASSERT(dn->dn_datablkshift != 0); 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; } /*
--- a/usr/src/uts/common/fs/zfs/vdev.c Wed Jan 30 10:55:11 2013 -0800 +++ b/usr/src/uts/common/fs/zfs/vdev.c Wed Jan 30 12:01:51 2013 -0800 @@ -1327,7 +1327,8 @@ 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; + uint64_t txg = spa_last_synced_txg(spa) != 0 ? + spa_last_synced_txg(spa) : -1ULL; if ((label = vdev_label_read_config(vd, txg)) == NULL) { vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN, @@ -1511,7 +1512,7 @@ !l2arc_vdev_present(vd)) l2arc_add_vdev(spa, vd); } else { - (void) vdev_validate(vd, spa_last_synced_txg(spa)); + (void) vdev_validate(vd, B_TRUE); } /*