]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add inode to truncate control
authorJosef Bacik <josef@toxicpanda.com>
Fri, 3 Dec 2021 22:18:15 +0000 (17:18 -0500)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Jan 2022 13:18:24 +0000 (14:18 +0100)
commita2f75c3e2f9b13e73fce43bb1923ea10c8b9c8f5
treee2d9a6c7862dd055a160c8e76e45776d8526dc95
parent9bcf97692231cdd58d923e63f40b0a5ea3f4efb6
btrfs: add inode to truncate control

In the future we're going to want to use btrfs_truncate_inode_items
without looking up the associated inode.  In order to accommodate this
add the inode to btrfs_truncate_control and handle the case where
control->inode is NULL appropriately.  This is fairly straightforward,
we simply need to add a helper for the trace points, as the file extent
map update is controlled by a flag on btrfs_truncate_control.

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>
fs/btrfs/free-space-cache.c
fs/btrfs/inode-item.c
fs/btrfs/inode-item.h
fs/btrfs/inode.c
fs/btrfs/tree-log.c