btrfs: use a flag to control when to clear the file extent range
authorJosef Bacik <josef@toxicpanda.com>
Fri, 3 Dec 2021 22:18:13 +0000 (17:18 -0500)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Jan 2022 13:18:24 +0000 (14:18 +0100)
commit655807b8957ba84a583104c422a8f53725997d55
treeeeb16ff3a661b2229ecae0c39e044b563e2329cf
parent5caa490ed8f07488e47378999bd4ad451bf8858b
btrfs: use a flag to control when to clear the file extent range

We only care about updating the file extent range when we are doing a
normal truncation.  We skip this for tree logging currently, but we can
also skip this for eviction as well.  Using a flag makes it more
explicit when we want to do this work.

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