0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef OCFS2_UPTODATE_H
0011 #define OCFS2_UPTODATE_H
0012
0013
0014
0015
0016
0017 struct ocfs2_caching_operations {
0018
0019
0020
0021
0022
0023 u64 (*co_owner)(struct ocfs2_caching_info *ci);
0024
0025
0026 struct super_block *(*co_get_super)(struct ocfs2_caching_info *ci);
0027
0028
0029
0030
0031 void (*co_cache_lock)(struct ocfs2_caching_info *ci);
0032 void (*co_cache_unlock)(struct ocfs2_caching_info *ci);
0033
0034
0035
0036
0037
0038 void (*co_io_lock)(struct ocfs2_caching_info *ci);
0039 void (*co_io_unlock)(struct ocfs2_caching_info *ci);
0040 };
0041
0042 int __init init_ocfs2_uptodate_cache(void);
0043 void exit_ocfs2_uptodate_cache(void);
0044
0045 void ocfs2_metadata_cache_init(struct ocfs2_caching_info *ci,
0046 const struct ocfs2_caching_operations *ops);
0047 void ocfs2_metadata_cache_purge(struct ocfs2_caching_info *ci);
0048 void ocfs2_metadata_cache_exit(struct ocfs2_caching_info *ci);
0049
0050 u64 ocfs2_metadata_cache_owner(struct ocfs2_caching_info *ci);
0051 void ocfs2_metadata_cache_io_lock(struct ocfs2_caching_info *ci);
0052 void ocfs2_metadata_cache_io_unlock(struct ocfs2_caching_info *ci);
0053
0054 int ocfs2_buffer_uptodate(struct ocfs2_caching_info *ci,
0055 struct buffer_head *bh);
0056 void ocfs2_set_buffer_uptodate(struct ocfs2_caching_info *ci,
0057 struct buffer_head *bh);
0058 void ocfs2_set_new_buffer_uptodate(struct ocfs2_caching_info *ci,
0059 struct buffer_head *bh);
0060 void ocfs2_remove_from_cache(struct ocfs2_caching_info *ci,
0061 struct buffer_head *bh);
0062 void ocfs2_remove_xattr_clusters_from_cache(struct ocfs2_caching_info *ci,
0063 sector_t block,
0064 u32 c_len);
0065 int ocfs2_buffer_read_ahead(struct ocfs2_caching_info *ci,
0066 struct buffer_head *bh);
0067
0068 #endif