From owner-svn-src-vendor@FreeBSD.ORG Thu Sep 5 17:56:00 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EBFEE1AC; Thu, 5 Sep 2013 17:56:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C08732488; Thu, 5 Sep 2013 17:56:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85Hu0KY094274; Thu, 5 Sep 2013 17:56:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85Hu05w094270; Thu, 5 Sep 2013 17:56:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309051756.r85Hu05w094270@svn.freebsd.org> From: Xin LI Date: Thu, 5 Sep 2013 17:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r255257 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 17:56:01 -0000 Author: delphij Date: Thu Sep 5 17:56:00 2013 New Revision: 255257 URL: http://svnweb.freebsd.org/changeset/base/255257 Log: Update vendor-sys/illumos/dist to 14172:be36a38bac3d: Illumos ZFS issues: 4082 zfs receive gets EFBIG from dmu_tx_hold_free() Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Thu Sep 5 17:55:14 2013 (r255256) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Thu Sep 5 17:56:00 2013 (r255257) @@ -673,6 +673,16 @@ dmu_free_long_range(objset_t *os, uint64 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); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Thu Sep 5 17:55:14 2013 (r255256) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Thu Sep 5 17:56:00 2013 (r255257) @@ -605,7 +605,6 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t if (len == DMU_OBJECT_END) len = (dn->dn_maxblkid+1) * dn->dn_datablksz - off; - /* * For i/o error checking, we read the first and last level-0 * blocks if they are not aligned, and all the level-1 blocks. @@ -617,7 +616,7 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t */ 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))