]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add helper to get the end offset of a file extent item
authorFilipe Manana <fdmanana@suse.com>
Mon, 9 Mar 2020 12:41:06 +0000 (12:41 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:56 +0000 (17:01 +0100)
commit857eb1811227dbf7a1d87977272fb0ea70dbff55
treecec688f519eb065bb76848cedc76cb0eb0df5337
parent681ec2e8d4ef5b2cba1c4111bb9e0b7d916264af
btrfs: add helper to get the end offset of a file extent item

Getting the end offset for a file extent item requires a bit of code since
the extent can be either inline or regular/prealloc. There are some places
all over the code base that open code this logic and in another patch
later in this series it will be needed again. Therefore encapsulate this
logic in a helper function and use it.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/file-item.c
fs/btrfs/inode.c
fs/btrfs/send.c
fs/btrfs/tree-log.c