Prepared by: | Arne Jansen <sensille@gmx.net> on 2012-Aug-16 22:11 +0200 MEST |
---|---|
Workspace: | /waflhome/arne/urika/hg/illumos-gate (at 7c498b6ae765) |
Compare against: | ssh://anonhg@hg.illumos.org/illumos-gate (at f6f7025c7a4d) |
Summary of changes: | 42 lines changed: 27 ins; 15 del; 0 mod; 1370 unchg |
Patch of changes: | illumos-gate.patch |
Printable review: | illumos-gate.pdf |
Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/uts/common/fs/zfs/dmu_tx.c
dmu_tx_count_free is doing a horrible over-estimation of used memory. It assumes that the file is fully non-sparse and calculates a worst-case estimate of how much memory is needed to hold all metadata for the file. If a large hole needs to be freed, the estimation goes into the TB-range, which obviously fails later on. This patch tries to calculate a more realistic estimate by counting the l1 blocks (the loop for this is already present) and assumes a worst-case distribution of those blocks over the full length given.42 lines changed: 27 ins; 15 del; 0 mod; 1370 unchg
This code review page was prepared using /opt/onbld/bin/webrev. Webrev is maintained by the OpenSolaris project. The latest version may be obtained here.