All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs41: Correct offset for LAYOUTCOMMIT v2
@ 2011-05-19 21:34 Vitaliy Gusev
  0 siblings, 0 replies; only message in thread
From: Vitaliy Gusev @ 2011-05-19 21:34 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: andros, linux-nfs, Vitaliy Gusev

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>
---
 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 f57f528..101c85a 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);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-19 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 21:34 [PATCH] nfs41: Correct offset for LAYOUTCOMMIT v2 Vitaliy Gusev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.