aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/aops.c
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2009-08-25 21:47:28 -0400
committerJoel Becker <joel.becker@oracle.com>2009-09-22 23:09:38 -0400
commit37f8a2bfaa8364dd3644cccee8824bb8f5e409a5 (patch)
treeab3083179c621c3e8d0be3980aaed96528f90599 /fs/ocfs2/aops.c
parent293b2f70b4a16a1ca91efd28ef3d6634262c6887 (diff)
ocfs2: CoW a reflinked cluster when it is truncated.
When we truncate a file to a specific size which resides in a reflinked cluster, we need to CoW it since ocfs2_zero_range_for_truncate will zero the space after the size(just another type of write). So we add a "max_cpos" in ocfs2_refcount_cow so that it will stop when it hit the max cluster offset. Signed-off-by: Tao Ma <tao.ma@oracle.com>
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r--fs/ocfs2/aops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 9db9d64ca475..33e03c551127 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1712,7 +1712,7 @@ int ocfs2_write_begin_nolock(struct address_space *mapping,
1712 goto out; 1712 goto out;
1713 } else if (ret == 1) { 1713 } else if (ret == 1) {
1714 ret = ocfs2_refcount_cow(inode, di_bh, 1714 ret = ocfs2_refcount_cow(inode, di_bh,
1715 wc->w_cpos, wc->w_clen); 1715 wc->w_cpos, wc->w_clen, UINT_MAX);
1716 if (ret) { 1716 if (ret) {
1717 mlog_errno(ret); 1717 mlog_errno(ret);
1718 goto out; 1718 goto out;