From 8351bbc05bc163758d3410ce6d6cab8eb4441609 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 4 Nov 2017 18:32:07 -0400 Subject: Update bcachefs sources to d4b7ef921a bcachefs: Refactoring --- libbcachefs/fs.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'libbcachefs/fs.h') diff --git a/libbcachefs/fs.h b/libbcachefs/fs.h index 5f2c39f0..d255ca7c 100644 --- a/libbcachefs/fs.h +++ b/libbcachefs/fs.h @@ -7,30 +7,35 @@ #include struct bch_inode_info { - struct inode vfs_inode; + struct inode v; - struct mutex update_lock; - u64 journal_seq; + struct mutex ei_update_lock; + u64 ei_journal_seq; - atomic_long_t i_size_dirty_count; + atomic_long_t ei_size_dirty_count; /* * these are updated whenever we update the inode in the btree - for * e.g. fsync */ - u64 i_size; - u32 i_flags; + u64 ei_size; + u32 ei_flags; - atomic_long_t i_sectors_dirty_count; - atomic64_t i_sectors; + atomic_long_t ei_sectors_dirty_count; + atomic64_t ei_sectors; - struct bch_hash_info str_hash; + struct bch_hash_info ei_str_hash; - unsigned long last_dirtied; + unsigned long ei_last_dirtied; }; #define to_bch_ei(_inode) \ - container_of(_inode, struct bch_inode_info, vfs_inode) + container_of_or_null(_inode, struct bch_inode_info, v) + +static inline struct bch_inode_info *file_bch_inode(struct file *file) +{ + return to_bch_ei(file_inode(file)); +} static inline u8 mode_to_type(umode_t mode) { -- cgit v1.2.3