From: "J. Bruce Fields" <bfields@fieldses.org>
To: Anna Schumaker <bjschuma@netapp.com>
Cc: "Schumaker, Bryan" <bryan.schumaker@netapp.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"Myklebust, Trond" <trond.myklebust@netapp.com>
Subject: Re: [PATCH 2/4] NFSD: Create nfs v4.2 decode ops
Date: Tue, 29 Oct 2013 09:33:25 -0400 [thread overview]
Message-ID: <20131029133325.GD29606@fieldses.org> (raw)
In-Reply-To: <526FAD82.9070909@netapp.com>
On Tue, Oct 29, 2013 at 08:43:46AM -0400, Anna Schumaker wrote:
> On Mon 28 Oct 2013 05:11:19 PM EDT, J. Bruce Fields wrote:
> > On Mon, Oct 28, 2013 at 08:59:59PM +0000, Myklebust, Trond wrote:
> >>> -----Original Message-----
> >>> From: linux-nfs-owner@vger.kernel.org [mailto:linux-nfs-
> >>> owner@vger.kernel.org] On Behalf Of J. Bruce Fields
> >>> Sent: Monday, October 28, 2013 4:54 PM
> >>> To: Schumaker, Bryan
> >>> Cc: linux-nfs@vger.kernel.org
> >>> Subject: Re: [PATCH 2/4] NFSD: Create nfs v4.2 decode ops
> >>>
> >>> On Mon, Oct 28, 2013 at 10:57:24AM -0400, Anna Schumaker wrote:
> >>>> I'm doing this in a separate patch to keep from putting in a lot of
> >>>> extra code when I go to add operations to the server for real.
> >>>
> >>> Makes sense.
> >>>
> >>> But: now we're duplicating the list of 4.0 op decoders 3 times and the
> >>> 4.1 ops twice. We'll never need different decoders for different
> >>> minorversions (worst case we can test for the minorversion in the decoder if
> >>> necessary).
> >>>
> >>> I wonder if there's a better way to organize this.... Maybe something more
> >>> like a single array with
> >>>
> >>> [OP_SETCLIENTID] = {
> >>> .op_decode = (nfsd4_dec)nfsd4_decode_access,
> >>> .op_unsupported_since_version = 1,
> >>> }
> >>> ...
> >>> [OP_EXCHANGE_ID] = {
> >>> .op_decode = (nfsd4_dec)nfsd4_decode_exchange_id,
> >>> .op_first_supported_in_version = 1,
> >>> }
> >>>
> >>> ?
> >>
> >> Is that really necessary? Why not just have a single array and have nfsd4_decode_clientid itself check the minor version?
> >
> > That'd work too. Every operation that's been introduced more recently
> > than 4.0 or that's since been deprecated would need a version check at
> > the top of its decoder. That'd be a dozen or so.
> >
> > But the information has to go somewhere and perhaps that's more
> > straightforward than sticking this in data.... OK, I'd be fine with
> > that.
>
> Makes sense. Do you want me to put this in with this patch series or
> do it as something separate either before or after?
Best would be to do it as something separate before the rest. So
combine the minorversion 0 and minorversion 1 cases into 1 array first.
And I can apply that patch now independent of the rest.
--b.
next prev parent reply other threads:[~2013-10-29 13:33 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 14:57 [PATCH 0/4] NFSD: Add support for WRITE_PLUS and SEEK Anna Schumaker
2013-10-28 14:57 ` [PATCH 1/4] NFSD: Update error codes Anna Schumaker
2013-10-28 14:57 ` [PATCH 2/4] NFSD: Create nfs v4.2 decode ops Anna Schumaker
2013-10-28 20:54 ` J. Bruce Fields
2013-10-28 20:59 ` Myklebust, Trond
2013-10-28 21:11 ` J. Bruce Fields
2013-10-29 12:43 ` Anna Schumaker
2013-10-29 13:33 ` J. Bruce Fields [this message]
2013-10-28 14:57 ` [PATCH 3/4] NFSD: Add WRITE_PLUS support for hole punches Anna Schumaker
2013-10-28 21:40 ` J. Bruce Fields
2013-10-29 12:49 ` Anna Schumaker
2013-10-29 13:34 ` J. Bruce Fields
2013-10-29 12:50 ` Anna Schumaker
2013-10-29 13:06 ` J. Bruce Fields
2013-10-29 13:11 ` Anna Schumaker
2013-10-29 13:23 ` Myklebust, Trond
2013-10-29 13:28 ` Anna Schumaker
2013-10-29 13:32 ` Dr Fields James Bruce
2013-11-02 13:54 ` Christoph Hellwig
2013-11-02 14:44 ` J. Bruce Fields
2013-11-02 14:51 ` Christoph Hellwig
2013-11-02 15:02 ` Myklebust, Trond
2013-11-02 15:07 ` Christoph Hellwig
2013-11-02 15:20 ` Christoph Hellwig
2013-11-02 13:52 ` Christoph Hellwig
2013-11-04 16:41 ` Anna Schumaker
2013-11-04 17:03 ` Christoph Hellwig
2013-11-04 17:23 ` Anna Schumaker
2013-11-04 18:53 ` Christoph Hellwig
2013-11-04 18:57 ` Anna Schumaker
2013-11-04 19:16 ` Chuck Lever
2013-11-04 19:19 ` Christoph Hellwig
2013-11-04 19:50 ` Chuck Lever
2013-11-04 19:54 ` Christoph Hellwig
2013-11-04 19:55 ` J. Bruce Fields
2013-11-04 20:03 ` Haynes, Tom
2013-11-04 20:13 ` Christoph Hellwig
2013-11-05 9:40 ` Christoph Hellwig
2013-11-05 14:23 ` Anna Schumaker
2013-11-05 15:11 ` Christoph Hellwig
2013-10-28 14:57 ` [PATCH 4/4] NFSD: Implement SEEK Anna Schumaker
2013-10-28 21:51 ` J. Bruce Fields
2013-10-29 12:53 ` Anna Schumaker
2013-10-29 7:35 ` Christoph Hellwig
2013-10-29 13:00 ` Anna Schumaker
2013-10-29 13:07 ` Christoph Hellwig
2013-10-29 13:30 ` J. Bruce Fields
2013-11-02 13:48 ` Christoph Hellwig
2013-11-02 14:37 ` J. Bruce Fields
2013-11-02 14:41 ` Christoph Hellwig
2013-11-04 16:46 ` J. Bruce Fields
2013-11-04 17:05 ` Christoph Hellwig
2013-11-04 17:22 ` Chuck Lever
2013-11-05 12:33 ` Christoph Hellwig
2013-11-04 21:56 ` Thomas Haynes
2013-11-05 1:03 ` Christoph Hellwig
2013-11-05 2:07 ` Haynes, Tom
2013-11-05 8:23 ` Christoph Hellwig
2013-10-31 16:04 ` Christoph Hellwig
2013-10-31 16:07 ` Anna Schumaker
2013-10-31 16:17 ` Anna Schumaker
2013-10-31 17:13 ` Christoph Hellwig
2013-10-28 14:57 ` [RFC 5/4] NFSD: Add basic CB_OFFLOAD support Anna Schumaker
2013-10-28 21:52 ` J. Bruce Fields
2013-10-29 7:37 ` Christoph Hellwig
2013-10-29 13:36 ` J. Bruce Fields
2013-10-29 13:38 ` Christoph Hellwig
2013-10-29 13:53 ` J. Bruce Fields
2013-10-29 15:11 ` Christoph Hellwig
2013-10-28 20:00 ` [PATCH 0/4] NFSD: Add support for WRITE_PLUS and SEEK Christoph Hellwig
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=20131029133325.GD29606@fieldses.org \
--to=bfields@fieldses.org \
--cc=bjschuma@netapp.com \
--cc=bryan.schumaker@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@netapp.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).