diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-12-03 17:18:04 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-01-07 14:18:24 +0100 |
commit | 54f03ab1e19b04dea546f83ae70b3285bc61b9f8 (patch) | |
tree | c5af64a97a7de3e5cb5fe3d2346d3eb71a434ca8 /fs/btrfs/inode-item.h | |
parent | 26c2c4540d6d5c85a22a857ccda304361f1afeaf (diff) |
btrfs: move btrfs_truncate_inode_items to inode-item.c
This is an inode item related manipulation with a few vfs related
adjustments. I'm going to remove the vfs related code from this helper
and simplify it a lot, but I want those changes to be easily seen via
git blame, so move this function now and then the simplification work
can be done.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode-item.h')
-rw-r--r-- | fs/btrfs/inode-item.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/btrfs/inode-item.h b/fs/btrfs/inode-item.h index 30476bcdf413..4464d7026180 100644 --- a/fs/btrfs/inode-item.h +++ b/fs/btrfs/inode-item.h @@ -10,8 +10,19 @@ struct btrfs_root; struct btrfs_path; struct btrfs_key; struct btrfs_inode_extref; +struct btrfs_inode; struct extent_buffer; +/* + * Return this if we need to call truncate_block for the last bit of the + * truncate. + */ +#define BTRFS_NEED_TRUNCATE_BLOCK 1 + +int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, + struct btrfs_root *root, + struct btrfs_inode *inode, u64 new_size, + u32 min_type, u64 *extents_found); int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, int name_len, |