uptodate.h (6e5a3d7538ad4e46a976862f593faf65750e37cc) uptodate.h (8cb471e8f82506937fe5e2e9fb0bf90f6b1f1170)
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * uptodate.h
5 *
6 * Cluster uptodate tracking
7 *
8 * Copyright (C) 2002, 2004, 2005 Oracle. All rights reserved.

--- 24 unchanged lines hidden (view full) ---

33struct ocfs2_caching_operations {
34 /*
35 * A u64 representing the owning structure. Usually this
36 * is the block number (i_blkno or whatnot). This is used so
37 * that caching log messages can identify the owning structure.
38 */
39 u64 (*co_owner)(struct ocfs2_caching_info *ci);
40
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * uptodate.h
5 *
6 * Cluster uptodate tracking
7 *
8 * Copyright (C) 2002, 2004, 2005 Oracle. All rights reserved.

--- 24 unchanged lines hidden (view full) ---

33struct ocfs2_caching_operations {
34 /*
35 * A u64 representing the owning structure. Usually this
36 * is the block number (i_blkno or whatnot). This is used so
37 * that caching log messages can identify the owning structure.
38 */
39 u64 (*co_owner)(struct ocfs2_caching_info *ci);
40
41 /* The superblock is needed during I/O. */
42 struct super_block *(*co_get_super)(struct ocfs2_caching_info *ci);
41 /*
42 * Lock and unlock the caching data. These will not sleep, and
43 * should probably be spinlocks.
44 */
45 void (*co_cache_lock)(struct ocfs2_caching_info *ci);
46 void (*co_cache_unlock)(struct ocfs2_caching_info *ci);
47
48 /*

--- 4 unchanged lines hidden (view full) ---

53 void (*co_io_unlock)(struct ocfs2_caching_info *ci);
54};
55
56int __init init_ocfs2_uptodate_cache(void);
57void exit_ocfs2_uptodate_cache(void);
58
59void ocfs2_metadata_cache_init(struct ocfs2_caching_info *ci,
60 const struct ocfs2_caching_operations *ops);
43 /*
44 * Lock and unlock the caching data. These will not sleep, and
45 * should probably be spinlocks.
46 */
47 void (*co_cache_lock)(struct ocfs2_caching_info *ci);
48 void (*co_cache_unlock)(struct ocfs2_caching_info *ci);
49
50 /*

--- 4 unchanged lines hidden (view full) ---

55 void (*co_io_unlock)(struct ocfs2_caching_info *ci);
56};
57
58int __init init_ocfs2_uptodate_cache(void);
59void exit_ocfs2_uptodate_cache(void);
60
61void ocfs2_metadata_cache_init(struct ocfs2_caching_info *ci,
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,
73 u32 c_len);
79 sector_t block,
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);
76
77#endif /* OCFS2_UPTODATE_H */
82 struct buffer_head *bh);
83
84#endif /* OCFS2_UPTODATE_H */