Btrfs: refill block reserves during truncate

When truncate starts, it allocates some space in the block reserves so
that we'll have enough to update metadata along the way.

For very large files, we can easily go through all of that space as we
loop through the extents.  This changes truncate to refill the space
reservation as it progresses through the file.

Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
Chris Mason 2015-02-04 06:59:29 -08:00
commit 28f75a0e6c
3 changed files with 46 additions and 11 deletions