]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: introduce per-inode file extent tree
authorJosef Bacik <josef@toxicpanda.com>
Fri, 17 Jan 2020 14:02:21 +0000 (09:02 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:24 +0000 (17:01 +0100)
commite090323b0bbaefa57214065db7b32a2738fdae59
tree68a747669fafc6d2a4f0da8760de78a004ba4f55
parent10cb877be9d8ac9d67120171ef3e10e1b51fde29
btrfs: introduce per-inode file extent tree

In order to keep track of where we have file extents on disk, and thus
where it is safe to adjust the i_size to, we need to have a tree in
place to keep track of the contiguous areas we have file extents for.

Add helpers to use this tree, as it's not required for NO_HOLES file
systems.  We will use this by setting DIRTY for areas we know we have
file extent item's set, and clearing it when we remove file extent items
for truncation.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/ctree.h
fs/btrfs/extent-io-tree.h
fs/btrfs/extent_io.c
fs/btrfs/file-item.c
fs/btrfs/inode.c
include/trace/events/btrfs.h