nfs41: Correct offset for LAYOUTCOMMIT

A client sends offset to MDS as it was seen by DS. As result,
file size after copy is only half of original file size in case
of 2 DS.

Signed-off-by: Vitaliy Gusev <gusev.vitaliy@nexenta.com>
Cc: stable@kernel.org [2.6.39]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Vitaliy Gusev 2011-05-20 01:34:46 +04:00 committed by Trond Myklebust
parent 60c16ea877
commit 4b8ee2b82e
1 changed files with 1 additions and 1 deletions

View File

@ -1009,7 +1009,7 @@ void
pnfs_set_layoutcommit(struct nfs_write_data *wdata) pnfs_set_layoutcommit(struct nfs_write_data *wdata)
{ {
struct nfs_inode *nfsi = NFS_I(wdata->inode); struct nfs_inode *nfsi = NFS_I(wdata->inode);
loff_t end_pos = wdata->args.offset + wdata->res.count; loff_t end_pos = wdata->mds_offset + wdata->res.count;
bool mark_as_dirty = false; bool mark_as_dirty = false;
spin_lock(&nfsi->vfs_inode.i_lock); spin_lock(&nfsi->vfs_inode.i_lock);