The following reply was made to PR kern/182570; it has been noted by GNATS.

From: Keith White <[email protected]>
To: [email protected]
Cc:  
Subject: Re: kern/182570: ZFS panic in receive
Date: Fri, 4 Oct 2013 07:56:24 -0400 (EDT)

 The following suggestion from Andrej Gapon fixes the problem for me:
 
 > ...
 > To me this looks very similar to a problem discovered and fixed in illumos 
 > some
 > time ago.  Please check if the following change improves the situation for 
 > you.
 >
 > https://github.com/avg-I/freebsd/commit/a7e7dece215bc5d00077e9c7f4db34d9e5c30659
 >
 > Raw:
 > https://github.com/avg-I/freebsd/commit/a7e7dece215bc5d00077e9c7f4db34d9e5c30659.patch
 > ...
 
 Once the patch is applied, "svn diff" gives:
 
 Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
 ===================================================================
 --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c       (revision 
255986)
 +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c       (working copy)
 @@ -677,6 +677,16 @@
        if (err != 0)
                return (err);
        err = dmu_free_long_range_impl(os, dn, offset, length);
 +
 +      /*
 +       * It is important to zero out the maxblkid when freeing the entire
 +       * file, so that (a) subsequent calls to dmu_free_long_range_impl()
 +       * will take the fast path, and (b) dnode_reallocate() can verify
 +       * that the entire file has been freed.
 +       */
 +      if (offset == 0 && length == DMU_OBJECT_END)
 +              dn->dn_maxblkid = 0;
 +
        dnode_rele(dn, FTAG);
        return (err);
    }
 Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
 ===================================================================
 --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c    (revision 
255986)
 +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c    (working copy)
 @@ -616,7 +616,7 @@
         */
        if (dn->dn_datablkshift == 0) {
                if (off != 0 || len < dn->dn_datablksz)
 -                      dmu_tx_count_write(txh, off, len);
 +                      dmu_tx_count_write(txh, 0, dn->dn_datablksz);
        } else {
                /* first block will be modified if it is not aligned */
                if (!IS_P2ALIGNED(off, 1 << dn->dn_datablkshift))
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to