ocfs2: Add CoW support.
authorTao Ma <tao.ma@oracle.com>
Tue, 25 Aug 2009 00:05:12 +0000 (08:05 +0800)
committerJoel Becker <joel.becker@oracle.com>
Wed, 23 Sep 2009 03:09:36 +0000 (20:09 -0700)
commit6f70fa519976a379d72781d927cf8e5f5b05ec86
tree563cdeb116f2016c3c4b7a627a51f0a85eec1566
parentbcbbb24a6a5c5b3e7b8e5284e0bfa23f45c32377
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>
fs/ocfs2/alloc.c
fs/ocfs2/alloc.h
fs/ocfs2/aops.c
fs/ocfs2/aops.h
fs/ocfs2/refcounttree.c
fs/ocfs2/refcounttree.h