ocfs2: zero tail of sparse files on truncate
[powerpc.git] / fs / ocfs2 / alloc.h
index 12ba897..3cb39cd 100644 (file)
 
 struct ocfs2_alloc_context;
 int ocfs2_insert_extent(struct ocfs2_super *osb,
-                       struct ocfs2_journal_handle *handle,
+                       handle_t *handle,
                        struct inode *inode,
                        struct buffer_head *fe_bh,
-                       u64 blkno,
+                       u32 cpos,
+                       u64 start_blk,
                        u32 new_clusters,
                        struct ocfs2_alloc_context *meta_ac);
 int ocfs2_num_free_extents(struct ocfs2_super *osb,
@@ -70,6 +71,8 @@ struct ocfs2_truncate_context {
        struct buffer_head *tc_last_eb_bh;
 };
 
+int ocfs2_zero_tail_for_truncate(struct inode *inode, handle_t *handle,
+                                u64 new_i_size);
 int ocfs2_prepare_truncate(struct ocfs2_super *osb,
                           struct inode *inode,
                           struct buffer_head *fe_bh,
@@ -79,4 +82,7 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb,
                          struct buffer_head *fe_bh,
                          struct ocfs2_truncate_context *tc);
 
+int ocfs2_find_leaf(struct inode *inode, struct ocfs2_extent_list *root_el,
+                   u32 cpos, struct buffer_head **leaf_bh);
+
 #endif /* OCFS2_ALLOC_H */