diff options
author | Chris Mason <clm@fb.com> | 2015-02-04 06:59:29 -0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-04-10 14:06:34 -0700 |
commit | 28f75a0e6cdfbce8115487ecbc0968a2c4e01806 (patch) | |
tree | 14c32d9251117f3ec0f771e95ab17c1d96fe2b94 /fs/btrfs/ctree.h | |
parent | 1262133b8d6f10f5ca7621cd4cf65ddf6254126a (diff) |
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>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 95944b81ed5c..6bf16d5134c5 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3297,6 +3297,9 @@ static inline gfp_t btrfs_alloc_write_mask(struct address_space *mapping) } /* extent-tree.c */ + +u64 btrfs_csum_bytes_to_leaves(struct btrfs_root *root, u64 csum_bytes); + static inline u64 btrfs_calc_trans_metadata_size(struct btrfs_root *root, unsigned num_items) { |