diff options
author | Tao Ma <tao.ma@oracle.com> | 2008-08-18 05:38:45 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-10-13 16:57:59 -0400 |
commit | 0eb8d47e69a2211a36643b180f1843ef45f6017d (patch) | |
tree | 745a063238cbcf6af84644bd51d4bfcd592e06a1 /fs/ocfs2/file.h | |
parent | e7d4cb6bc19658646357eeff134645cd9bc3479f (diff) |
ocfs2: Make high level btree extend code generic
Factor out the non-inode specifics of ocfs2_do_extend_allocation() into a more generic
function, ocfs2_do_cluster_allocation(). ocfs2_do_extend_allocation calls
ocfs2_do_cluster_allocation() now, but the latter can be used for other
btree types as well.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/file.h')
-rw-r--r-- | fs/ocfs2/file.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/fs/ocfs2/file.h b/fs/ocfs2/file.h index 18e5c80cc737..e92382cbca5f 100644 --- a/fs/ocfs2/file.h +++ b/fs/ocfs2/file.h | |||
@@ -33,6 +33,7 @@ extern const struct file_operations ocfs2_dops_no_plocks; | |||
33 | extern const struct inode_operations ocfs2_file_iops; | 33 | extern const struct inode_operations ocfs2_file_iops; |
34 | extern const struct inode_operations ocfs2_special_file_iops; | 34 | extern const struct inode_operations ocfs2_special_file_iops; |
35 | struct ocfs2_alloc_context; | 35 | struct ocfs2_alloc_context; |
36 | enum ocfs2_alloc_restarted; | ||
36 | 37 | ||
37 | struct ocfs2_file_private { | 38 | struct ocfs2_file_private { |
38 | struct file *fp_file; | 39 | struct file *fp_file; |
@@ -40,21 +41,16 @@ struct ocfs2_file_private { | |||
40 | struct ocfs2_lock_res fp_flock; | 41 | struct ocfs2_lock_res fp_flock; |
41 | }; | 42 | }; |
42 | 43 | ||
43 | enum ocfs2_alloc_restarted { | 44 | int ocfs2_add_inode_data(struct ocfs2_super *osb, |
44 | RESTART_NONE = 0, | 45 | struct inode *inode, |
45 | RESTART_TRANS, | 46 | u32 *logical_offset, |
46 | RESTART_META | 47 | u32 clusters_to_add, |
47 | }; | 48 | int mark_unwritten, |
48 | int ocfs2_do_extend_allocation(struct ocfs2_super *osb, | 49 | struct buffer_head *fe_bh, |
49 | struct inode *inode, | 50 | handle_t *handle, |
50 | u32 *logical_offset, | 51 | struct ocfs2_alloc_context *data_ac, |
51 | u32 clusters_to_add, | 52 | struct ocfs2_alloc_context *meta_ac, |
52 | int mark_unwritten, | 53 | enum ocfs2_alloc_restarted *reason_ret); |
53 | struct buffer_head *fe_bh, | ||
54 | handle_t *handle, | ||
55 | struct ocfs2_alloc_context *data_ac, | ||
56 | struct ocfs2_alloc_context *meta_ac, | ||
57 | enum ocfs2_alloc_restarted *reason_ret); | ||
58 | int ocfs2_extend_no_holes(struct inode *inode, u64 new_i_size, | 54 | int ocfs2_extend_no_holes(struct inode *inode, u64 new_i_size, |
59 | u64 zero_to); | 55 | u64 zero_to); |
60 | int ocfs2_setattr(struct dentry *dentry, struct iattr *attr); | 56 | int ocfs2_setattr(struct dentry *dentry, struct iattr *attr); |