4047 panic from dbuf_free_range() from dmu_free_object() while
     doing zfs receive
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@nexenta.com>

References:
  https://www.illumos.org/issues/4047
  illumos/illumos-gate@713d6c2088

Ported-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1775

Porting notes:

1. The exported symbol dmu_free_object() was renamed to
   dmu_free_long_object() in Illumos.
This commit is contained in:
Matthew Ahrens
2013-08-20 20:11:52 -08:00
committed by Brian Behlendorf
parent 46ba1e59d3
commit b663a23d36
8 changed files with 99 additions and 89 deletions
+2 -1
View File
@@ -632,7 +632,8 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t object, uint64_t off, uint64_t len)
* if they are blocksize-aligned.
*/
if (dn->dn_datablkshift == 0) {
dmu_tx_count_write(txh, off, len);
if (off != 0 || len < dn->dn_datablksz)
dmu_tx_count_write(txh, off, len);
} else {
/* first block will be modified if it is not aligned */
if (!IS_P2ALIGNED(off, 1 << dn->dn_datablkshift))