aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2015-02-04 06:59:29 -0800
committerChris Mason <clm@fb.com>2015-04-10 14:06:34 -0700
commit28f75a0e6cdfbce8115487ecbc0968a2c4e01806 (patch)
tree14c32d9251117f3ec0f771e95ab17c1d96fe2b94 /fs/btrfs/ctree.h
parentBtrfs: account for crcs in delayed ref processing (diff)
downloadlinux-dev-28f75a0e6cdfbce8115487ecbc0968a2c4e01806.tar.xz
linux-dev-28f75a0e6cdfbce8115487ecbc0968a2c4e01806.zip
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.h3
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)
{