aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/uptodate.h
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2009-02-10 23:00:41 -0500
committerJoel Becker <joel.becker@oracle.com>2009-09-04 19:07:48 -0400
commit8cb471e8f82506937fe5e2e9fb0bf90f6b1f1170 (patch)
treee275a8f5db101a9990ba44931cfd116123112b11 /fs/ocfs2/uptodate.h
parent6e5a3d7538ad4e46a976862f593faf65750e37cc (diff)
ocfs2: Take the inode out of the metadata read/write paths.
We are really passing the inode into the ocfs2_read/write_blocks() functions to get at the metadata cache. This commit passes the cache directly into the metadata block functions, divorcing them from the inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/uptodate.h')
-rw-r--r--fs/ocfs2/uptodate.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/fs/ocfs2/uptodate.h b/fs/ocfs2/uptodate.h
index 3b33eb88d320..f268273d6516 100644
--- a/fs/ocfs2/uptodate.h
+++ b/fs/ocfs2/uptodate.h
@@ -38,6 +38,8 @@ struct ocfs2_caching_operations {
38 */ 38 */
39 u64 (*co_owner)(struct ocfs2_caching_info *ci); 39 u64 (*co_owner)(struct ocfs2_caching_info *ci);
40 40
41 /* The superblock is needed during I/O. */
42 struct super_block *(*co_get_super)(struct ocfs2_caching_info *ci);
41 /* 43 /*
42 * Lock and unlock the caching data. These will not sleep, and 44 * Lock and unlock the caching data. These will not sleep, and
43 * should probably be spinlocks. 45 * should probably be spinlocks.
@@ -58,20 +60,25 @@ void exit_ocfs2_uptodate_cache(void);
58 60
59void ocfs2_metadata_cache_init(struct ocfs2_caching_info *ci, 61void ocfs2_metadata_cache_init(struct ocfs2_caching_info *ci,
60 const struct ocfs2_caching_operations *ops); 62 const struct ocfs2_caching_operations *ops);
61void ocfs2_metadata_cache_purge(struct inode *inode); 63void ocfs2_metadata_cache_purge(struct ocfs2_caching_info *ci);
62 64
63int ocfs2_buffer_uptodate(struct inode *inode, 65u64 ocfs2_metadata_cache_owner(struct ocfs2_caching_info *ci);
66struct super_block *ocfs2_metadata_cache_get_super(struct ocfs2_caching_info *ci);
67void ocfs2_metadata_cache_io_lock(struct ocfs2_caching_info *ci);
68void ocfs2_metadata_cache_io_unlock(struct ocfs2_caching_info *ci);
69
70int ocfs2_buffer_uptodate(struct ocfs2_caching_info *ci,
64 struct buffer_head *bh); 71 struct buffer_head *bh);
65void ocfs2_set_buffer_uptodate(struct inode *inode, 72void ocfs2_set_buffer_uptodate(struct ocfs2_caching_info *ci,
66 struct buffer_head *bh); 73 struct buffer_head *bh);
67void ocfs2_set_new_buffer_uptodate(struct inode *inode, 74void ocfs2_set_new_buffer_uptodate(struct ocfs2_caching_info *ci,
68 struct buffer_head *bh); 75 struct buffer_head *bh);
69void ocfs2_remove_from_cache(struct inode *inode, 76void ocfs2_remove_from_cache(struct ocfs2_caching_info *ci,
70 struct buffer_head *bh); 77 struct buffer_head *bh);
71void ocfs2_remove_xattr_clusters_from_cache(struct inode *inode, 78void ocfs2_remove_xattr_clusters_from_cache(struct ocfs2_caching_info *ci,
72 sector_t block, 79 sector_t block,
73 u32 c_len); 80 u32 c_len);
74int ocfs2_buffer_read_ahead(struct inode *inode, 81int ocfs2_buffer_read_ahead(struct ocfs2_caching_info *ci,
75 struct buffer_head *bh); 82 struct buffer_head *bh);
76 83
77#endif /* OCFS2_UPTODATE_H */ 84#endif /* OCFS2_UPTODATE_H */