From: Kinglong Mee <kinglongmee@gmail.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>,
Trond Myklebust <trond.myklebust@primarydata.com>,
kinglongmee@gmail.com
Subject: Re: [PATCH v2] nfsd: nfsd4_cb_sequence_done() for processing more cb errors
Date: Wed, 24 Jun 2015 09:10:55 +0800 [thread overview]
Message-ID: <558A039F.5020802@gmail.com> (raw)
In-Reply-To: <20150623213401.GB25319@fieldses.org>
On 6/24/2015 5:34 AM, J. Bruce Fields wrote:
> On Wed, Jun 17, 2015 at 09:57:34PM +0800, Kinglong Mee wrote:
>> When testing pnfs layout, nfsd got error NFS4ERR_SEQ_MISORDERED.
>> It is caused by nfs return NFS4ERR_DELAY before validate_seqid(),
>> don't update the sequnce id, but nfsd updates the sequnce id !!!
>>
>> According to RFC5661 20.9.3,
>> " If CB_SEQUENCE returns an error, then the state of the slot
>> (sequence ID, cached reply) MUST NOT change."
>>
>> This patch introduce a new helper nfsd4_cb_sequence_done() for
>> processing more callback errors as client.
>>
>> v2,
>> thanks Christoph's advice of adding a helper process errors as client
>
> Thanks, could you rebase this on top of my for-4.2 branch? (I already
> took your earlier patch.) Also:
Got it.
>
>> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
>> ---
>> fs/nfsd/nfs4callback.c | 122 +++++++++++++++++++++++++++++++++++++------------
>> fs/nfsd/state.h | 1 +
>> 2 files changed, 93 insertions(+), 30 deletions(-)
>>
>> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
>> index ce8d3f2..6fce478 100644
>> --- a/fs/nfsd/nfs4callback.c
>> +++ b/fs/nfsd/nfs4callback.c
> ...
>> @@ -874,6 +874,11 @@ static void nfsd4_cb_prepare(struct rpc_task *task, void *calldata)
>> struct nfs4_client *clp = cb->cb_clp;
>> u32 minorversion = clp->cl_minorversion;
>>
>> + /*
>> + * cb_seq_status is only set in decode_cb_sequence4res,
>> + * and so will remain 1 if an rpc level failure occurs.
>> + */
>> + cb->cb_seq_status = 1;
>
> Isn't that a valid error code? OK, I guess NFS4ERR_PERM isn't a legal
> SEQUENCE return. Still, -1 might make this a bit more obvious.
No, error code is a negative number, 1 is safe.
Also, it is copied from client's error process in nfs41_sequence_done.
thanks,
Kinglong Mee
next prev parent reply other threads:[~2015-06-24 1:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 10:59 [PATCH 2/2] nfsd: Update callback sequnce id only CB_SEQUENCE success Kinglong Mee
2015-06-17 13:57 ` [PATCH v2] nfsd: nfsd4_cb_sequence_done() for processing more cb errors Kinglong Mee
2015-06-23 21:34 ` J. Bruce Fields
2015-06-24 1:10 ` Kinglong Mee [this message]
2015-06-24 1:20 ` J. Bruce Fields
2015-06-24 8:33 ` [PATCH v3] nfsd: New helper " Kinglong Mee
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=558A039F.5020802@gmail.com \
--to=kinglongmee@gmail.com \
--cc=bfields@fieldses.org \
--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;
as well as URLs for NNTP newsgroup(s).