comparison usr/src/uts/common/fs/zfs/dmu.c @ 14172:be36a38bac3d

4082 zfs receive gets EFBIG from dmu_tx_hold_free() Reviewed by: Eric Schrock <eric.schrock@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Matthew Ahrens <mahrens@delphix.com>
date Fri, 30 Aug 2013 01:19:35 -0800
parents dceb17481b99
children
comparison
equal deleted inserted replaced
14171:98413c8cf54d 14172:be36a38bac3d
671 671
672 err = dnode_hold(os, object, FTAG, &dn); 672 err = dnode_hold(os, object, FTAG, &dn);
673 if (err != 0) 673 if (err != 0)
674 return (err); 674 return (err);
675 err = dmu_free_long_range_impl(os, dn, offset, length); 675 err = dmu_free_long_range_impl(os, dn, offset, length);
676
677 /*
678 * It is important to zero out the maxblkid when freeing the entire
679 * file, so that (a) subsequent calls to dmu_free_long_range_impl()
680 * will take the fast path, and (b) dnode_reallocate() can verify
681 * that the entire file has been freed.
682 */
683 if (offset == 0 && length == DMU_OBJECT_END)
684 dn->dn_maxblkid = 0;
685
676 dnode_rele(dn, FTAG); 686 dnode_rele(dn, FTAG);
677 return (err); 687 return (err);
678 } 688 }
679 689
680 int 690 int