]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: control extent reference updates with a control flag for truncate
authorJosef Bacik <josef@toxicpanda.com>
Fri, 3 Dec 2021 22:18:12 +0000 (17:18 -0500)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Jan 2022 13:18:24 +0000 (14:18 +0100)
commit8ca5c36b033cc5be85f2a692225c773a933b1aab
treec65ac19b2c7fafac0d671813c95aa67cb4ad06ee
parent49bcedc4dedfc5d9415027144488a61a95036c73
btrfs: control extent reference updates with a control flag for truncate

We've had weird bugs in the past where we forgot to adjust the truncate
path to deal with the fact that we can be called by the tree log path.
Instead of checking if our root is a LOG_ROOT use a flag on the
btrfs_truncate_control to indicate that we don't want to do extent
reference updates during this truncate.

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