summaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu_tx.c
diff options
context:
space:
mode:
authorGeorge Wilson <[email protected]>2013-04-10 16:58:22 -0700
committerBrian Behlendorf <[email protected]>2013-04-12 09:01:36 -0700
commit295304bed6fa6744b8d011e36b9c2180311cedb2 (patch)
tree7c9744fb311f7126addb1a258e27988414845a50 /module/zfs/dmu_tx.c
parent9d248f73a4941a5c5fdf5d701bee159aa6bdfa24 (diff)
Illumos #3422, #3425
3422 zpool create/syseventd race yield non-importable pool 3425 first write to a new zvol can fail with EFBIG Reviewed by: Adam Leventhal <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Garrett D'Amore <[email protected]> References: illumos/illumos-gate@bda8819455defbccd06981d9a13b240b682a3d50 https://www.illumos.org/issues/3422 https://www.illumos.org/issues/3425 Ported-by: Brian Behlendorf <[email protected]> Closes #1390
Diffstat (limited to 'module/zfs/dmu_tx.c')
-rw-r--r--module/zfs/dmu_tx.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c
index e47d858dd..81c86dff4 100644
--- a/module/zfs/dmu_tx.c
+++ b/module/zfs/dmu_tx.c
@@ -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>
@@ -301,6 +301,7 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
delta = P2NPHASE(off, dn->dn_datablksz);
}
+ min_ibs = max_ibs = dn->dn_indblkshift;
if (dn->dn_maxblkid > 0) {
/*
* The blocksize can't change,
@@ -308,13 +309,6 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
*/
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;
}
/*