summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/accessors.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2022-11-15 11:16:12 -0500
committerDavid Sterba <dsterba@suse.com>2022-12-05 18:00:58 +0100
commit6bfd0ffa6f2ae0ead92af7c4521626cd456115c5 (patch)
treeac993d1af002a288bb0cf7d830daef69cd6f4498 /fs/btrfs/accessors.h
parent3a3178c7f7675661d7bd0c67f57420e20982bd34 (diff)
downloadlinux-6bfd0ffa6f2ae0ead92af7c4521626cd456115c5.tar.bz2
btrfs: move file_extent_item helpers into file-item.h
These helpers use functions that are in multiple places, which makes it tricky to sync them into btrfs-progs. Move them to file-item.h and then include file-item.h in places that use these helpers. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/accessors.h')
-rw-r--r--fs/btrfs/accessors.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/fs/btrfs/accessors.h b/fs/btrfs/accessors.h
index b9d9a69685df..f0d017f9407f 100644
--- a/fs/btrfs/accessors.h
+++ b/fs/btrfs/accessors.h
@@ -915,16 +915,6 @@ BTRFS_SETGET_STACK_FUNCS(stack_file_extent_disk_num_bytes,
BTRFS_SETGET_STACK_FUNCS(stack_file_extent_compression,
struct btrfs_file_extent_item, compression, 8);
-static inline unsigned long btrfs_file_extent_inline_start(
- const struct btrfs_file_extent_item *e)
-{
- return (unsigned long)e + BTRFS_FILE_EXTENT_INLINE_DATA_START;
-}
-
-static inline u32 btrfs_file_extent_calc_inline_size(u32 datasize)
-{
- return BTRFS_FILE_EXTENT_INLINE_DATA_START + datasize;
-}
BTRFS_SETGET_FUNCS(file_extent_type, struct btrfs_file_extent_item, type, 8);
BTRFS_SETGET_FUNCS(file_extent_disk_bytenr, struct btrfs_file_extent_item,
@@ -946,18 +936,6 @@ BTRFS_SETGET_FUNCS(file_extent_encryption, struct btrfs_file_extent_item,
BTRFS_SETGET_FUNCS(file_extent_other_encoding, struct btrfs_file_extent_item,
other_encoding, 16);
-/*
- * Returns the number of bytes used by the item on disk, minus the size of any
- * extent headers. If a file is compressed on disk, this is the compressed
- * size.
- */
-static inline u32 btrfs_file_extent_inline_item_len(
- const struct extent_buffer *eb,
- int nr)
-{
- return btrfs_item_size(eb, nr) - BTRFS_FILE_EXTENT_INLINE_DATA_START;
-}
-
/* btrfs_qgroup_status_item */
BTRFS_SETGET_FUNCS(qgroup_status_generation, struct btrfs_qgroup_status_item,
generation, 64);