All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>,
	Jim Rees <rees@umich.edu>, Peng Tao <bergwolf@gmail.com>,
	NFS list <linux-nfs@vger.kernel.org>
Subject: [PATCH 4/6] pnfs: use lwb as layoutcommit length
Date: Fri, 29 Jul 2011 23:33:31 -0700	[thread overview]
Message-ID: <4E33A5BB.8000407@panasas.com> (raw)
In-Reply-To: <4E33A288.80403@panasas.com>

From: Peng Tao <bergwolf@gmail.com>

Using NFS4_MAX_UINT64 will break current protocol.

[Needed in v3.0]
CC: Stable Tree <stable@kernel.org>
Signed-off-by: Peng Tao <peng_tao@emc.com>
---
 fs/nfs/nfs4xdr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index e6e8f3b..fc97fd5 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1888,7 +1888,7 @@ encode_layoutcommit(struct xdr_stream *xdr,
 	*p++ = cpu_to_be32(OP_LAYOUTCOMMIT);
 	/* Only whole file layouts */
 	p = xdr_encode_hyper(p, 0); /* offset */
-	p = xdr_encode_hyper(p, NFS4_MAX_UINT64); /* length */
+	p = xdr_encode_hyper(p, args->lastbytewritten + 1);	/* length */
 	*p++ = cpu_to_be32(0); /* reclaim */
 	p = xdr_encode_opaque_fixed(p, args->stateid.data, NFS4_STATEID_SIZE);
 	*p++ = cpu_to_be32(1); /* newoffset = TRUE */
-- 
1.7.6



  parent reply	other threads:[~2011-07-30  6:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-30  6:19 [PATCHSET 0/6] Patches needed for Stable Boaz Harrosh
2011-07-30  6:29 ` [PATCH 1/6] pnfs: save layoutcommit lwb at layout header Boaz Harrosh
2011-07-30  6:30 ` [PATCH 2/6] pnfs: save layoutcommit cred at layout header init Boaz Harrosh
2011-07-30  6:32 ` [PATCH 3/6] pnfs: let layoutcommit handle a list of lseg Boaz Harrosh
2011-07-30  6:33 ` Boaz Harrosh [this message]
2011-07-30  6:34 ` [PATCH 5/6] pnfs-obj: Bug when we are running out of bio Boaz Harrosh
2011-07-30  6:35 ` [PATCH 6/6] pnfs-obj: Fix the comp_index != 0 case Boaz Harrosh

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=4E33A5BB.8000407@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bergwolf@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=rees@umich.edu \
    /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 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.