linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Vitaliy Gusev <gusev.vitaliy@gmail.com>
Cc: andros@netapp.com, linux-nfs@vger.kernel.org,
	Vitaliy Gusev <gusev.vitaliy@nexenta.com>
Subject: Re: [PATCH] nfs41: Correct offset for LAYOUTCOMMIT
Date: Thu, 19 May 2011 15:38:10 -0400	[thread overview]
Message-ID: <1305833890.5552.0.camel@lade.trondhjem.org> (raw)
In-Reply-To: <1305832245-17318-1-git-send-email-gusev.vitaliy@nexenta.com>

On Thu, 2011-05-19 at 23:10 +0400, Vitaliy Gusev wrote: 
> 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/nfs4filelayout.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
> index be79dc9..790eb1d 100644
> --- a/fs/nfs/nfs4filelayout.c
> +++ b/fs/nfs/nfs4filelayout.c
> @@ -167,6 +167,7 @@ filelayout_set_layoutcommit(struct nfs_write_data *wdata)
>  	    wdata->res.verf->committed == NFS_FILE_SYNC)
>  		return;
>  
> +	wdata->args.offset = wdata->mds_offset;
>  	pnfs_set_layoutcommit(wdata);
>  	dprintk("%s ionde %lu pls_end_pos %lu\n", __func__, wdata->inode->i_ino,
>  		(unsigned long) wdata->lseg->pls_end_pos);

Err... Shouldn't we rather be fixing pnfs_set_layoutcommit() to use the
mds_offset instead of hacking args.offset?

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com


  reply	other threads:[~2011-05-19 19:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 19:10 [PATCH] nfs41: Correct offset for LAYOUTCOMMIT Vitaliy Gusev
2011-05-19 19:38 ` Trond Myklebust [this message]
2011-05-19 19:45   ` Vitaliy Gusev
2011-05-19 19:56     ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305833890.5552.0.camel@lade.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=andros@netapp.com \
    --cc=gusev.vitaliy@gmail.com \
    --cc=gusev.vitaliy@nexenta.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).