Btrfs: refill block reserves during truncate
authorChris Mason <clm@fb.com>
Wed, 4 Feb 2015 14:59:29 +0000 (06:59 -0800)
committerChris Mason <clm@fb.com>
Fri, 10 Apr 2015 21:06:34 +0000 (14:06 -0700)
commit28f75a0e6cdfbce8115487ecbc0968a2c4e01806
tree14c32d9251117f3ec0f771e95ab17c1d96fe2b94
parent1262133b8d6f10f5ca7621cd4cf65ddf6254126a
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>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/inode.c