From: "J. Bruce Fields" <bfields@fieldses.org>
To: Kinglong Mee <kinglongmee@gmail.com>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/4] nfs: define NFS4_MAXTAGLEN to OPAQUE limits
Date: Wed, 29 Apr 2015 15:56:23 -0400 [thread overview]
Message-ID: <20150429195623.GC23980@fieldses.org> (raw)
In-Reply-To: <5516CD45.7060200@gmail.com>
On Sat, Mar 28, 2015 at 11:48:21PM +0800, Kinglong Mee wrote:
> According to rfc3530 and rfc5661, the max tag length should be
> limited by opaque limited.
>
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
> fs/nfs/nfs4xdr.c | 7 -------
> include/linux/nfs4.h | 1 +
> 2 files changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
> index 5c399ec..1c2ad01 100644
> --- a/fs/nfs/nfs4xdr.c
> +++ b/fs/nfs/nfs4xdr.c
> @@ -67,13 +67,6 @@
>
> static int nfs4_stat_to_errno(int);
>
> -/* NFSv4 COMPOUND tags are only wanted for debugging purposes */
> -#ifdef DEBUG
> -#define NFS4_MAXTAGLEN 20
> -#else
> -#define NFS4_MAXTAGLEN 0
> -#endif
As far as I can tell, DEBUG is never defined, and there's no logic
elsewhere that could actually make use of the tag if DEBUG was defined.
So maybe simplest would be just to remove the DEBUG case and leave
#define NFS4_MAXTAGLEN 0
--b.
> -
> /* lock,open owner id:
> * we currently use size 2 (u64) out of (NFS4_OPAQUE_LIMIT >> 2)
> */
> diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
> index ed43cb7..ba54ec2 100644
> --- a/include/linux/nfs4.h
> +++ b/include/linux/nfs4.h
> @@ -33,6 +33,7 @@ struct nfs4_acl {
> };
>
> #define NFS4_MAXLABELLEN 2048
> +#define NFS4_MAXTAGLEN NFS4_OPAQUE_LIMIT
>
> struct nfs4_label {
> uint32_t lfs;
> --
> 2.3.4
next prev parent reply other threads:[~2015-04-29 19:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-28 15:46 [PATCH 0/4] Define common macro NFS4_MAXTAGLEN for nfs/nfsd Kinglong Mee
2015-03-28 15:48 ` [PATCH 1/4] nfs: define NFS4_MAXTAGLEN to OPAQUE limits Kinglong Mee
2015-04-29 19:56 ` J. Bruce Fields [this message]
2015-03-28 15:49 ` [PATCH 2/4] nfs: use NFS4_MAXTAGLEN for cb_taglen checking Kinglong Mee
2015-03-28 15:50 ` [PATCH 3/4] nfsd: use NFS4_MAXTAGLEN for taglen checking Kinglong Mee
2015-03-28 15:51 ` [PATCH 4/4] nfsd: use NFS4_MAXTAGLEN defined in include/linux/nfs4.h Kinglong Mee
2015-04-29 20:25 ` [PATCH 0/4] Define common macro NFS4_MAXTAGLEN for nfs/nfsd J. Bruce Fields
2015-04-29 20:28 ` Chuck Lever
2015-04-29 20:29 ` Trond Myklebust
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=20150429195623.GC23980@fieldses.org \
--to=bfields@fieldses.org \
--cc=kinglongmee@gmail.com \
--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 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.