]> bbs.cooldavid.org Git - net-next-2.6.git/commit - fs/ocfs2/file.c
Ocfs2: Fix hole punching to correctly do CoW during cluster zeroing.
authorTristan Ye <tristan.ye@oracle.com>
Tue, 11 May 2010 09:54:43 +0000 (17:54 +0800)
committerJoel Becker <joel.becker@oracle.com>
Tue, 18 May 2010 19:27:46 +0000 (12:27 -0700)
commite8aec068ecb1957630816cfa2c150c6b3ddd1790
treeb6140b82846cd2f5ab264d01be2a4473e56faf97
parent78f94673d7faf01677f374f4ebbf324ff1a0aa6e
Ocfs2: Fix hole punching to correctly do CoW during cluster zeroing.

Based on the previous patch of optimizing truncate, the bugfix for
refcount trees when punching holes can be fairly easy
and straightforward since most of work we should take into account for
refcounting have been completed already in ocfs2_remove_btree_range().

This patch performs CoW for refcounted extents when a hole being punched
whose start or end offset were in the middle of a cluster, which means
partial zeroing of the cluster will be performed soon.

The patch has been tested fixing the following bug:

http://oss.oracle.com/bugzilla/show_bug.cgi?id=1216

Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/file.c