summaryrefslogtreecommitdiff
path: root/fs/btrfs/btrfs_inode.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2023-09-27 15:22:39 +0300
committerDavid Sterba <dsterba@suse.com>2023-10-12 17:44:16 +0300
commit54c65371464e6e676494473dd258d7c337146a35 (patch)
tree34734407610577f943041172cdfc66b85f4829ae /fs/btrfs/btrfs_inode.h
parentcb6cbab79055ca207ad88bc54226b48ececdcef0 (diff)
downloadlinux-54c65371464e6e676494473dd258d7c337146a35.tar.xz
btrfs: open code btrfs_ordered_inode_tree in btrfs_inode
The structure btrfs_ordered_inode_tree is used only in one place, in btrfs_inode. The structure itself has a 4 byte hole which is wasted space. Move the btrfs_ordered_inode_tree members to btrfs_inode with a common prefix 'ordered_tree_' where the hole can be utilized and shrink inode size. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r--fs/btrfs/btrfs_inode.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index f2c928345d53..3a01443a9fe0 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -114,7 +114,9 @@ struct btrfs_inode {
struct mutex log_mutex;
/* used to order data wrt metadata */
- struct btrfs_ordered_inode_tree ordered_tree;
+ spinlock_t ordered_tree_lock;
+ struct rb_root ordered_tree;
+ struct rb_node *ordered_tree_last;
/* list of all the delalloc inodes in the FS. There are times we need
* to write all the delalloc pages to disk, and this list is used