From: Benny Halevy <bhalevy@panasas.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Chuck Lever <chucklever@gmail.com>,
NFS list <linux-nfs@vger.kernel.org>,
pNFS Mailing List <pnfs@linux-nfs.org>
Subject: Re: [pnfs] [PATCH 0/2] fix nfsd stateid encoding
Date: Tue, 12 Aug 2008 20:40:28 +0300 [thread overview]
Message-ID: <48A1CB0C.4090906@panasas.com> (raw)
In-Reply-To: <20080811175026.GA1781@fieldses.org>
On Aug. 11, 2008, 20:50 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote:
> On Mon, Aug 11, 2008 at 08:39:59PM +0300, Benny Halevy wrote:
>> On Aug. 11, 2008, 19:28 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote:
>>> On Mon, Aug 11, 2008 at 12:17:35PM -0400, Chuck Lever wrote:
>>>> Hi Benny-
>>>>
>>>> On Mon, Aug 11, 2008 at 12:11 PM, Benny Halevy <bhalevy@panasas.com> wrote:
>>>>> On Aug. 11, 2008, 18:58 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote:
>>>>>> On Mon, Aug 11, 2008 at 05:09:36PM +0300, Benny Halevy wrote:
>>>>>>> Bruce, in a couple locations the nfsd needs to encode the stateid.seqid
>>>>>>> as a uint32_t rather than as opaque.
>>>>>> Agreed, thanks.
>>>>>>
>>>>>> Though I have a hard time figuring out whether this has any impact in
>>>>>> practice. Presumably the only change on the wire is that we'll get the
>>>>>> endianness of the stateid4.seqid right? But that field is mostly opaque
>>>>>> to the client anyway; 3530 says
>>>>>>
>>>>>> The server is required to increment the seqid field
>>>>>> monotonically at each transition of the stateid. This is
>>>>>> important since the client will inspect the seqid in OPEN
>>>>>> stateids to determine the order of OPEN processing done by the
>>>>>> server.
>>>>>>
>>>>>> but doesn't say why this is important. I'm sure this has been brought
>>>>>> up on the ietf list before, but can't recall whether someone came up
>>>>>> with a justification for the importance of this.
>>>>>>
>>>>>> Anyway, so I figure these should be queued up for the next (2.6.28)
>>>>>> merge window. Thanks!
>>>>> Actually, I think this breaks delegreturn.
>>>>> Since we decode the stateid.si_generation correctly, it will get swabbed
>>>>> in delegreturn on little-endian servers. This will cause
>>>>> nfs4_preprocess_stateid_op/check_stateid_generation as called by
>>>>> nfsd4_delegreturn to fail. And eventually, unhash_delegation
>>>>> wouldn't be called.
>>>> Sounds plausible, good catch. Yet another reason we should have an
>>>> easy-to-access delegation counter metric on both the client and
>>>> server.
>>>>
>>>> I wonder, since you found three separate places where this is needed:
>>>> should you construct a helper function?
>>> A stateid encoder/decoder? Sure, that could be a good idea.
>> Cool. Would you like me to rework the patches I've already sent
>> or send a patch adding the helpers on top of them?
>
> I'm fine with whichever you think makes the most sense.
>
> --b.
OK. It's better to separate the fixes from the refactoring of code.
The 7-patch patchset in reply to this message does the following:
[PATCH 1/7] nfsd: properly xdr-encode stateid4.seqid as uint32_t for cb_recall
encoding fix for cb_recall.
There's no helper defined since there's only one use.
I've defined a helper and used in the nfs41 series since
there, there are 2 (cb_recall and cb_layoutrecall).
[PATCH 2/7] nfsd: properly xdr-encode deleg stateid returned from open
[PATCH 3/7] nfsd: fix nfsd4_encode_open buffer space reservation
xdr encoding fixes
[PATCH 4/7] nfsd: nfs4xdr encode_stateid helper function
[PATCH 5/7] nfsd: don't declare p in ENCODE_SEQID_OP_HEAD
xdr encode_stateid refactoring
[PATCH 6/7] nfsd: properly xdr-decode NFS4_OPEN_CLAIM_DELEGATE_CUR stateid
xdr decoding fix
[PATCH 7/7] nfsd: nfs4xdr decode_stateid helper function
xdr decode_stateid refactoring
Benny
next prev parent reply other threads:[~2008-08-12 17:40 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-11 14:09 [PATCH 0/2] fix nfsd stateid encoding Benny Halevy
2008-08-11 14:34 ` [PATCH 1/2] nfsd: properly xdr-encode stateid4.seqid as uint32_t for cb_recall Benny Halevy
2008-08-11 14:35 ` [PATCH 2/2] nfsd: properly xdr-encode deleg stateid returned from open Benny Halevy
2008-08-11 15:58 ` [PATCH 0/2] fix nfsd stateid encoding J. Bruce Fields
2008-08-11 16:11 ` [pnfs] " Benny Halevy
2008-08-11 16:17 ` Chuck Lever
[not found] ` <76bd70e30808110917y5a9a1950l1d905f081bd7a819-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-11 16:27 ` Benny Halevy
2008-08-11 16:28 ` J. Bruce Fields
2008-08-11 17:39 ` Benny Halevy
2008-08-11 17:50 ` J. Bruce Fields
2008-08-12 17:40 ` Benny Halevy [this message]
2008-08-12 17:42 ` [PATCH 1/7] nfsd: properly xdr-encode stateid4.seqid as uint32_t for cb_recall Benny Halevy
2008-08-12 17:43 ` [PATCH 2/7] nfsd: properly xdr-encode deleg stateid returned from open Benny Halevy
2008-08-12 17:44 ` [PATCH 3/7] nfsd: fix nfsd4_encode_open buffer space reservation Benny Halevy
2008-08-12 18:31 ` J. Bruce Fields
2008-08-12 17:45 ` [PATCH 4/7] nfsd: nfs4xdr encode_stateid helper function Benny Halevy
2008-08-12 18:39 ` J. Bruce Fields
2008-08-13 7:27 ` Benny Halevy
2008-08-13 15:01 ` J. Bruce Fields
2008-08-12 17:45 ` [PATCH 5/7] nfsd: don't declare p in ENCODE_SEQID_OP_HEAD Benny Halevy
2008-08-12 17:45 ` [PATCH 6/7] nfsd: properly xdr-decode NFS4_OPEN_CLAIM_DELEGATE_CUR stateid Benny Halevy
2008-08-12 17:46 ` [PATCH 7/7] nfsd: nfs4xdr decode_stateid helper function Benny Halevy
2008-08-12 19:04 ` J. Bruce Fields
2008-08-13 7:31 ` Benny Halevy
2008-08-13 15:03 ` J. Bruce Fields
2008-08-13 17:59 ` Trond Myklebust
2008-08-13 18:30 ` J. Bruce Fields
2008-08-13 18:59 ` Trond Myklebust
2008-08-13 19:11 ` J. Bruce Fields
2008-08-13 19:35 ` Trond Myklebust
2008-08-13 20:17 ` J. Bruce Fields
2008-08-13 20:57 ` Chuck Lever
2008-08-14 10:49 ` Benny Halevy
2008-08-17 12:02 ` [pnfs] " Boaz Harrosh
2008-08-19 22:44 ` J. Bruce Fields
2008-08-12 19:14 ` [pnfs] [PATCH 0/2] fix nfsd stateid encoding J. Bruce Fields
2008-08-11 16:27 ` J. Bruce Fields
2008-08-11 17:34 ` Benny Halevy
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=48A1CB0C.4090906@panasas.com \
--to=bhalevy@panasas.com \
--cc=bfields@fieldses.org \
--cc=chucklever@gmail.com \
--cc=linux-nfs@vger.kernel.org \
--cc=pnfs@linux-nfs.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