From: Vitaliy Gusev <gusev.vitaliy@nexenta.com>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: "Adamson, Andy" <William.Adamson@netapp.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] nfs41: Initialize slot->seq_nr at nfs4_init_slot_table()
Date: Wed, 15 Feb 2012 04:34:12 +0400 [thread overview]
Message-ID: <4F3AFD84.3020709@nexenta.com> (raw)
In-Reply-To: <1329259606.11759.15.camel@lade.trondhjem.org>
On 02/15/2012 02:46 AM, Myklebust, Trond wrote:
> Hi Vitaliy.
>
> What's wrong with sa_sequenceid == 0? I can't see anything in the spec
> that states that the sequenceid is supposed to be initialised to 1.
That is good question.
In 2.10.6.1. "Slot Identifiers and Reply Cache":
A slot contains a sequence ID and the cached reply corresponding to
the request sent with that sequence ID. The sequence ID is a 32-bit
unsigned value, and is therefore in the range 0..0xFFFFFFFF (2^32 -
1). The first time a slot is used, the requester MUST specify a
sequence ID of one (Section 18.36).
In 18.36.4.4 "Session creation":
For each slot in the reply cache, the
server sets the sequence ID to zero, and records an entry
^^^^^^^^^
containing a COMPOUND reply with zero operations and the error
NFS4ERR_SEQ_MISORDERED. This way, if the first SEQUENCE request
sent has a sequence ID equal to zero, the server can simply
^^^^^^^^^^^^
return what is in the reply cache: NFS4ERR_SEQ_MISORDERED. The
client initializes its reply cache for receiving callbacks in the
same way, and similarly, the first CB_SEQUENCE operation on a
slot after session creation MUST have a sequence ID of one.
So sending "zero" sa_sequenceid is allowed.
But if Linux NFS server receives first OP_SEQUENCE with "sa_sequenceid
== 0", it replies "NFS4ERR_RETRY_UNCACHED_REP" (for OP_PUTROOTFH) - but
expected SEQ_MISORDERED for OP_SEQUENCE. Illumos NFSv4.1 implementation
returns allowed SEQ_MISORDERED.
So why just do not fix receiving error and correct sending sa_sequenceid
to 1?
next prev parent reply other threads:[~2012-02-15 0:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-14 21:48 [PATCH] nfs41: Initialize slot->seq_nr at nfs4_init_slot_table() Vitaliy Gusev
2012-02-14 22:46 ` Myklebust, Trond
2012-02-15 0:34 ` Vitaliy Gusev [this message]
2012-02-15 0:43 ` Myklebust, Trond
2012-02-15 0:53 ` J. Bruce Fields
2012-02-15 1:50 ` Myklebust, Trond
2012-02-15 2:30 ` Myklebust, Trond
2012-02-15 14:11 ` Vitaliy Gusev
2012-02-15 15:07 ` Adamson, Andy
2012-02-15 15:46 ` Myklebust, Trond
2012-02-15 16:06 ` Andy Adamson
2012-02-15 18:37 ` Myklebust, Trond
2012-02-15 18:45 ` Adamson, Andy
2012-02-15 15:01 ` Adamson, Andy
2012-02-15 15:06 ` Vitaliy Gusev
2012-02-15 15:16 ` Andy Adamson
2012-02-15 15:27 ` Vitaliy Gusev
2012-02-15 15:29 ` Myklebust, Trond
2012-02-15 15:45 ` Andy Adamson
2012-02-15 15:52 ` J. Bruce Fields
2012-02-15 15:15 ` Andy Adamson
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=4F3AFD84.3020709@nexenta.com \
--to=gusev.vitaliy@nexenta.com \
--cc=Trond.Myklebust@netapp.com \
--cc=William.Adamson@netapp.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 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.