diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-11-04 18:32:07 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-11-08 16:01:26 -0900 |
commit | 8351bbc05bc163758d3410ce6d6cab8eb4441609 (patch) | |
tree | ceadbb138b842701e8edc3c1d5fb1a772cf7d8de /libbcachefs/fs.h | |
parent | bf8c59996b3fb2a940827d12438a9e18eca6db4c (diff) |
Update bcachefs sources to d4b7ef921a bcachefs: Refactoring
Diffstat (limited to 'libbcachefs/fs.h')
-rw-r--r-- | libbcachefs/fs.h | 27 |
1 files changed, 16 insertions, 11 deletions
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 <linux/stat.h> 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) { |