Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2013 10:00:01 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-fs@FreeBSD.org
Subject:   Re: kern/182570: commit references a PR
Message-ID:  <201310101000.r9AA01Ng025381@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/182570; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/182570: commit references a PR
Date: Thu, 10 Oct 2013 09:53:54 +0000 (UTC)

 Author: avg
 Date: Thu Oct 10 09:53:46 2013
 New Revision: 256259
 URL: http://svnweb.freebsd.org/changeset/base/256259
 
 Log:
   MFV r255257: 4082 zfs receive gets EFBIG from dmu_tx_hold_free()
   
     illumos change 14172:be36a38bac3d:
     illumos ZFS issues:
       4082 zfs receive gets EFBIG from dmu_tx_hold_free()
   
   Please note that this change is slightly different from r255257, because
   it is merged out of order with other (larger) upstream changes.
   
   PR:		kern/182570
   Reported by:	Keith White <kwhite@site.uottawa.ca>
   Tested by:	Keith White <kwhite@site.uottawa.ca>
   Approved by:	re (glebius)
   MFC after:	1 week
   X-MFC after:	r254753
 
 Modified:
   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
 Directory Properties:
   head/sys/cddl/contrib/opensolaris/   (props changed)
 
 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
 ==============================================================================
 --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Thu Oct 10 09:43:15 2013	(r256258)
 +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Thu Oct 10 09:53:46 2013	(r256259)
 @@ -677,6 +677,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: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
 ==============================================================================
 --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c	Thu Oct 10 09:43:15 2013	(r256258)
 +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c	Thu Oct 10 09:53:46 2013	(r256259)
 @@ -616,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))
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310101000.r9AA01Ng025381>