aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/alloc.h
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2009-08-24 20:05:12 -0400
committerJoel Becker <joel.becker@oracle.com>2009-09-22 23:09:36 -0400
commit6f70fa519976a379d72781d927cf8e5f5b05ec86 (patch)
tree563cdeb116f2016c3c4b7a627a51f0a85eec1566 /fs/ocfs2/alloc.h
parentbcbbb24a6a5c5b3e7b8e5284e0bfa23f45c32377 (diff)
ocfs2: Add CoW support.
This patch try CoW support for a refcounted record. the whole process will be: 1. Calculate how many clusters we need to CoW and where we start. Extents that are not completely encompassed by the write will be broken on 1MB boundaries. 2. Do CoW for the clusters with the help of page cache. 3. Change the b-tree structure with the new allocated clusters. Signed-off-by: Tao Ma <tao.ma@oracle.com>
Diffstat (limited to 'fs/ocfs2/alloc.h')
-rw-r--r--fs/ocfs2/alloc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ocfs2/alloc.h b/fs/ocfs2/alloc.h
index 19d5b88a93df..9c122d574464 100644
--- a/fs/ocfs2/alloc.h
+++ b/fs/ocfs2/alloc.h
@@ -271,6 +271,11 @@ static inline int ocfs2_is_empty_extent(struct ocfs2_extent_rec *rec)
271 return !rec->e_leaf_clusters; 271 return !rec->e_leaf_clusters;
272} 272}
273 273
274int ocfs2_grab_pages(struct inode *inode, loff_t start, loff_t end,
275 struct page **pages, int *num);
276void ocfs2_map_and_dirty_page(struct inode *inode, handle_t *handle,
277 unsigned int from, unsigned int to,
278 struct page *page, int zero, u64 *phys);
274/* 279/*
275 * Structures which describe a path through a btree, and functions to 280 * Structures which describe a path through a btree, and functions to
276 * manipulate them. 281 * manipulate them.