6 #include <linux/seqlock.h>
8 struct bch_inode_info {
9 struct inode vfs_inode;
11 struct mutex update_lock;
14 atomic_long_t i_size_dirty_count;
17 * these are updated whenever we update the inode in the btree - for
23 atomic_long_t i_sectors_dirty_count;
26 struct bch_hash_info str_hash;
29 #define to_bch_ei(_inode) \
30 container_of(_inode, struct bch_inode_info, vfs_inode)
32 static inline u8 mode_to_type(umode_t mode)
34 return (mode >> 12) & 15;
37 /* returns 0 if we want to do the update, or error is passed up */
38 typedef int (*inode_set_fn)(struct bch_inode_info *,
39 struct bch_inode *, void *);
41 int __must_check __bch_write_inode(struct cache_set *, struct bch_inode_info *,
42 inode_set_fn, void *);
43 int __must_check bch_write_inode(struct cache_set *,
44 struct bch_inode_info *);
46 void bch_fs_exit(void);
47 int bch_fs_init(void);
49 #endif /* _BCACHE_FS_H */