diff options
author | Matthew Ahrens <[email protected]> | 2013-08-30 01:19:35 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-11-05 12:25:26 -0800 |
commit | 92bc214c2e00bd4a430eac1629f1bcf2fc590d51 (patch) | |
tree | 2f52bb1b45423ac9d7bd9c9d43299c953e72c0c9 /module/zfs/dmu.c | |
parent | ac72fac3eaa569902cad88053167f7d74e7fe7e4 (diff) |
Illumos #4082
4082 zfs receive gets EFBIG from dmu_tx_hold_free()
Reviewed by: Eric Schrock <[email protected]>
Reviewed by: Christopher Siden <[email protected]>
Reviewed by: George Wilson <[email protected]>
Approved by: Richard Lowe <[email protected]>
References:
https://www.illumos.org/issues/4082
illumos/illumos-gate@5253393b09789ec67bec153b866d7285a1cf1645
Ported-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #1775
Diffstat (limited to 'module/zfs/dmu.c')
-rw-r--r-- | module/zfs/dmu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c index 1136e1d70..72fce35c5 100644 --- a/module/zfs/dmu.c +++ b/module/zfs/dmu.c @@ -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); } |