diff options
author | Vitaliy Gusev <gusev.vitaliy@gmail.com> | 2011-05-20 01:34:46 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-03 09:32:42 +0900 |
commit | 51b79580f09e3566a7bdbf885b9d2dfbd9817be1 (patch) | |
tree | 3bd2a6f93e1417c1fdc20e6da501358fc9b0af46 | |
parent | f2277bfde1808ad803ada27f80f1f3e7dc680c8e (diff) | |
download | linux-stable-51b79580f09e3566a7bdbf885b9d2dfbd9817be1.tar.gz linux-stable-51b79580f09e3566a7bdbf885b9d2dfbd9817be1.tar.bz2 linux-stable-51b79580f09e3566a7bdbf885b9d2dfbd9817be1.zip |
nfs41: Correct offset for LAYOUTCOMMIT
commit 4b8ee2b82e8b0b6e17ee33feb74fcdb5c6d8dbdd upstream.
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>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | fs/nfs/pnfs.c | 2 |
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 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); |