diff options
author | Matthew Ahrens <[email protected]> | 2013-08-07 10:32:46 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-11-05 12:16:14 -0800 |
commit | 383fc4a9970ede483dc4bd7579f1c62942d1312f (patch) | |
tree | bc98a98911c5d218b8911d6424f9f07133bab132 /module/zfs/dmu_tx.c | |
parent | 9554185d90a9f833c023c1bb8bc35779b8fd1b10 (diff) |
Illumos #3955
3955 ztest failure: assertion refcount_count(&tx->tx_space_written) +
delta <= tx->tx_space_towrite
Reviewed by: Adam Leventhal <[email protected]>
Reviewed by: Dan Kimmel <[email protected]>
Reviewed by: George Wilson <[email protected]>
Approved by: Richard Lowe <[email protected]>
References:
https://www.illumos.org/issues/3955
illumos/illumos-gate@be9000cc677e0a8d04e5be45c61d7370fc8c7b54
Ported-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #1775
Diffstat (limited to 'module/zfs/dmu_tx.c')
-rw-r--r-- | module/zfs/dmu_tx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c index 7ee214bb0..5e4a5cbbe 100644 --- a/module/zfs/dmu_tx.c +++ b/module/zfs/dmu_tx.c @@ -465,12 +465,12 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, uint64_t off, uint64_t len) blkid = off >> dn->dn_datablkshift; nblks = (len + dn->dn_datablksz - 1) >> dn->dn_datablkshift; - if (blkid >= dn->dn_maxblkid) { + if (blkid > dn->dn_maxblkid) { rw_exit(&dn->dn_struct_rwlock); return; } if (blkid + nblks > dn->dn_maxblkid) - nblks = dn->dn_maxblkid - blkid; + nblks = dn->dn_maxblkid - blkid + 1; } l0span = nblks; /* save for later use to calc level > 1 overhead */ |