From: Kinglong Mee <kinglongmee@gmail.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Cc: Weston Andros Adamson <dros@primarydata.com>,
"J. Bruce Fields" <bfields@fieldses.org>,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH 2/2] nfs: Initialize cb_sequenceres information before validate_seqid()
Date: Fri, 12 Jun 2015 08:32:24 +0800 [thread overview]
Message-ID: <557A2898.6020009@gmail.com> (raw)
In-Reply-To: <556D8C75.4050409@gmail.com>
And this one.
Ping ...
On 6/2/2015 6:59 PM, Kinglong Mee wrote:
> For a cb_layoutrecall replay, nfsd got CB_SEQUENCE status of zero,
> but all informations of cb_sequenceres are zero too !!!
>
> validate_seqid() return NFS4ERR_RETRY_UNCACHED_REP for a replay,
> and skip the initlize cb_sequenceres.
>
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
> fs/nfs/callback_proc.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
> index 7e9653a..17a5c57 100644
> --- a/fs/nfs/callback_proc.c
> +++ b/fs/nfs/callback_proc.c
> @@ -445,6 +445,13 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
> goto out;
> }
>
> + memcpy(&res->csr_sessionid, &args->csa_sessionid,
> + sizeof(res->csr_sessionid));
> + res->csr_sequenceid = args->csa_sequenceid;
> + res->csr_slotid = args->csa_slotid;
> + res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
> + res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
> +
> status = validate_seqid(tbl, args);
> spin_unlock(&tbl->slot_tbl_lock);
> if (status)
> @@ -462,13 +469,6 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
> goto out;
> }
>
> - memcpy(&res->csr_sessionid, &args->csa_sessionid,
> - sizeof(res->csr_sessionid));
> - res->csr_sequenceid = args->csa_sequenceid;
> - res->csr_slotid = args->csa_slotid;
> - res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
> - res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
> -
> /*
> * RFC5661 20.9.3
> * If CB_SEQUENCE returns an error, then the state of the slot
>
prev parent reply other threads:[~2015-06-12 0:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 10:59 [PATCH 2/2] nfs: Initialize cb_sequenceres information before validate_seqid() Kinglong Mee
2015-06-12 0:32 ` Kinglong Mee [this message]
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=557A2898.6020009@gmail.com \
--to=kinglongmee@gmail.com \
--cc=bfields@fieldses.org \
--cc=dros@primarydata.com \
--cc=hch@infradead.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/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