mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
Illumos #4082
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> References: https://www.illumos.org/issues/4082 illumos/illumos-gate@5253393b09 Ported-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #1775
This commit is contained in:
committed by
Brian Behlendorf
parent
ac72fac3ea
commit
92bc214c2e
@@ -672,6 +672,16 @@ dmu_free_long_range(objset_t *os, uint64_t object,
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user