Skip to content

Commit

Permalink
nfs41: Correct offset for LAYOUTCOMMIT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vitaliy Gusev authored and Trond Myklebust committed May 27, 2011
1 parent 60c16ea commit 4b8ee2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ void
pnfs_set_layoutcommit(struct nfs_write_data *wdata)
{
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;

spin_lock(&nfsi->vfs_inode.i_lock);
Expand Down

0 comments on commit 4b8ee2b

Please sign in to comment.