aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaliy Gusev <gusev.vitaliy@gmail.com>2011-05-19 17:34:46 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-05-27 17:42:01 -0400
commit4b8ee2b82e8b0b6e17ee33feb74fcdb5c6d8dbdd (patch)
treea8b0eda00ea2376598431808af901872808c014e
parent60c16ea877546e559988a8b1e4f4256afbbd83e6 (diff)
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>
-rw-r--r--fs/nfs/pnfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index f57f5281a520..101c85a3644e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1009,7 +1009,7 @@ void
1009pnfs_set_layoutcommit(struct nfs_write_data *wdata) 1009pnfs_set_layoutcommit(struct nfs_write_data *wdata)
1010{ 1010{
1011 struct nfs_inode *nfsi = NFS_I(wdata->inode); 1011 struct nfs_inode *nfsi = NFS_I(wdata->inode);
1012 loff_t end_pos = wdata->args.offset + wdata->res.count; 1012 loff_t end_pos = wdata->mds_offset + wdata->res.count;
1013 bool mark_as_dirty = false; 1013 bool mark_as_dirty = false;
1014 1014
1015 spin_lock(&nfsi->vfs_inode.i_lock); 1015 spin_lock(&nfsi->vfs_inode.i_lock);