From 60b11392f1a09433740bda3048202213daa27736 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Fri, 16 Feb 2007 11:46:50 -0800 Subject: ocfs2: zero tail of sparse files on truncate Since we don't zero on extend anymore, truncate needs to be fixed up to zero the part of a file between i_size and and end of it's cluster. Otherwise a subsequent extend could expose bad data. This introduced a new helper, which can be used in ocfs2_write(). Signed-off-by: Mark Fasheh --- fs/ocfs2/aops.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'fs/ocfs2/aops.h') diff --git a/fs/ocfs2/aops.h b/fs/ocfs2/aops.h index eeb2c42483e8..7d94071f0ab7 100644 --- a/fs/ocfs2/aops.h +++ b/fs/ocfs2/aops.h @@ -30,6 +30,18 @@ handle_t *ocfs2_start_walk_page_trans(struct inode *inode, unsigned from, unsigned to); +int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno, + struct inode *inode, unsigned int from, + unsigned int to, int new); + +int walk_page_buffers( handle_t *handle, + struct buffer_head *head, + unsigned from, + unsigned to, + int *partial, + int (*fn)( handle_t *handle, + struct buffer_head *bh)); + struct ocfs2_write_ctxt; typedef int (ocfs2_page_writer)(struct inode *, struct ocfs2_write_ctxt *, u64 *, unsigned int *, unsigned int *); -- cgit v1.2.3