aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/refcounttree.c
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2010-08-11 22:36:38 -0400
committerTao Ma <tao.ma@oracle.com>2010-08-11 22:39:57 -0400
commit155027121fe52f9b4f25e9d156c22f2f5012e5fe (patch)
tree74067d52b685ab314173e74cc85a43a5d9e20c7d /fs/ocfs2/refcounttree.c
parentb890823635e022467b924e3d9da8c5166a4e349c (diff)
ocfs2: Add struct file to ocfs2_refcount_cow.
Add a new parameter 'struct file *' to ocfs2_refcount_cow so that we can add readahead support later. Signed-off-by: Tao Ma <tao.ma@oracle.com>
Diffstat (limited to 'fs/ocfs2/refcounttree.c')
-rw-r--r--fs/ocfs2/refcounttree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 3ac5aa733e9c..66dab3c0d495 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -3404,6 +3404,7 @@ static int ocfs2_replace_cow(struct ocfs2_cow_context *context)
3404 * unrefcounted extent. 3404 * unrefcounted extent.
3405 */ 3405 */
3406static int ocfs2_refcount_cow_hunk(struct inode *inode, 3406static int ocfs2_refcount_cow_hunk(struct inode *inode,
3407 struct file *file,
3407 struct buffer_head *di_bh, 3408 struct buffer_head *di_bh,
3408 u32 cpos, u32 write_len, u32 max_cpos) 3409 u32 cpos, u32 write_len, u32 max_cpos)
3409{ 3410{
@@ -3481,6 +3482,7 @@ out:
3481 * clusters between cpos and cpos+write_len are safe to modify. 3482 * clusters between cpos and cpos+write_len are safe to modify.
3482 */ 3483 */
3483int ocfs2_refcount_cow(struct inode *inode, 3484int ocfs2_refcount_cow(struct inode *inode,
3485 struct file *file,
3484 struct buffer_head *di_bh, 3486 struct buffer_head *di_bh,
3485 u32 cpos, u32 write_len, u32 max_cpos) 3487 u32 cpos, u32 write_len, u32 max_cpos)
3486{ 3488{
@@ -3500,7 +3502,7 @@ int ocfs2_refcount_cow(struct inode *inode,
3500 num_clusters = write_len; 3502 num_clusters = write_len;
3501 3503
3502 if (ext_flags & OCFS2_EXT_REFCOUNTED) { 3504 if (ext_flags & OCFS2_EXT_REFCOUNTED) {
3503 ret = ocfs2_refcount_cow_hunk(inode, di_bh, cpos, 3505 ret = ocfs2_refcount_cow_hunk(inode, file, di_bh, cpos,
3504 num_clusters, max_cpos); 3506 num_clusters, max_cpos);
3505 if (ret) { 3507 if (ret) {
3506 mlog_errno(ret); 3508 mlog_errno(ret);