Merge branch 'cow_readahead' of git://oss.oracle.com/git/tma/linux-2.6 into merge-2
This commit is contained in:
@@ -360,7 +360,7 @@ static int ocfs2_cow_file_pos(struct inode *inode,
|
||||
if (!(ext_flags & OCFS2_EXT_REFCOUNTED))
|
||||
goto out;
|
||||
|
||||
return ocfs2_refcount_cow(inode, fe_bh, cpos, 1, cpos+1);
|
||||
return ocfs2_refcount_cow(inode, NULL, fe_bh, cpos, 1, cpos+1);
|
||||
|
||||
out:
|
||||
return status;
|
||||
@@ -903,8 +903,8 @@ static int ocfs2_zero_extend_get_range(struct inode *inode,
|
||||
zero_clusters = last_cpos - zero_cpos;
|
||||
|
||||
if (needs_cow) {
|
||||
rc = ocfs2_refcount_cow(inode, di_bh, zero_cpos, zero_clusters,
|
||||
UINT_MAX);
|
||||
rc = ocfs2_refcount_cow(inode, NULL, di_bh, zero_cpos,
|
||||
zero_clusters, UINT_MAX);
|
||||
if (rc) {
|
||||
mlog_errno(rc);
|
||||
goto out;
|
||||
@@ -2052,6 +2052,7 @@ out:
|
||||
}
|
||||
|
||||
static int ocfs2_prepare_inode_for_refcount(struct inode *inode,
|
||||
struct file *file,
|
||||
loff_t pos, size_t count,
|
||||
int *meta_level)
|
||||
{
|
||||
@@ -2069,7 +2070,7 @@ static int ocfs2_prepare_inode_for_refcount(struct inode *inode,
|
||||
|
||||
*meta_level = 1;
|
||||
|
||||
ret = ocfs2_refcount_cow(inode, di_bh, cpos, clusters, UINT_MAX);
|
||||
ret = ocfs2_refcount_cow(inode, file, di_bh, cpos, clusters, UINT_MAX);
|
||||
if (ret)
|
||||
mlog_errno(ret);
|
||||
out:
|
||||
@@ -2077,7 +2078,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ocfs2_prepare_inode_for_write(struct dentry *dentry,
|
||||
static int ocfs2_prepare_inode_for_write(struct file *file,
|
||||
loff_t *ppos,
|
||||
size_t count,
|
||||
int appending,
|
||||
@@ -2085,6 +2086,7 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry,
|
||||
int *has_refcount)
|
||||
{
|
||||
int ret = 0, meta_level = 0;
|
||||
struct dentry *dentry = file->f_path.dentry;
|
||||
struct inode *inode = dentry->d_inode;
|
||||
loff_t saved_pos, end;
|
||||
|
||||
@@ -2140,6 +2142,7 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry,
|
||||
meta_level = -1;
|
||||
|
||||
ret = ocfs2_prepare_inode_for_refcount(inode,
|
||||
file,
|
||||
saved_pos,
|
||||
count,
|
||||
&meta_level);
|
||||
@@ -2254,7 +2257,7 @@ relock:
|
||||
}
|
||||
|
||||
can_do_direct = direct_io;
|
||||
ret = ocfs2_prepare_inode_for_write(file->f_path.dentry, ppos,
|
||||
ret = ocfs2_prepare_inode_for_write(file, ppos,
|
||||
iocb->ki_left, appending,
|
||||
&can_do_direct, &has_refcount);
|
||||
if (ret < 0) {
|
||||
@@ -2373,7 +2376,7 @@ static int ocfs2_splice_to_file(struct pipe_inode_info *pipe,
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ocfs2_prepare_inode_for_write(out->f_path.dentry, &sd->pos,
|
||||
ret = ocfs2_prepare_inode_for_write(out, &sd->pos,
|
||||
sd->total_len, 0, NULL, NULL);
|
||||
if (ret < 0) {
|
||||
mlog_errno(ret);
|
||||
|
Reference in New Issue
Block a user