All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Cc: linux-nfs@vger.kernel.org, linux-ext4@vger.kernel.org,
	hch@infradead.org, yong.fan@whamcloud.com,
	linux-fsdevel@vger.kernel.org, tytso@mit.edu,
	adilger@whamcloud.com
Subject: Re: [PATCH 3/4] RFC: Remove check for a 32-bit cookie in nfsd4_readdir()
Date: Tue, 9 Aug 2011 13:31:45 -0400	[thread overview]
Message-ID: <20110809173145.GA16206@fieldses.org> (raw)
In-Reply-To: <20110808153808.1872437.85162.stgit@fsdevel3>

On Mon, Aug 08, 2011 at 05:38:08PM +0200, Bernd Schubert wrote:
> Fan Yong <yong.fan@whamcloud.com> noticed setting
> FMODE_32bithash wouldn't work with nfsd v4, as
> nfsd4_readdir() checks for 32 bit cookies. However, according to RFC 3530
> cookies have a 64 bit type and cookies are also defined as u64 in
> 'struct nfsd4_readdir'. So remove the test for >32-bit values.

Wow, thanks, I wonder where that check came from.  Looks like it was
there since the very first nfsv4 commit.

Applying.

--b.

> 
> Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
> ---
>  fs/nfsd/nfs4proc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index e807776..9bf0a66 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -691,7 +691,7 @@ nfsd4_readdir(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
>  	readdir->rd_bmval[1] &= nfsd_suppattrs1(cstate->minorversion);
>  	readdir->rd_bmval[2] &= nfsd_suppattrs2(cstate->minorversion);
>  
> -	if ((cookie > ~(u32)0) || (cookie == 1) || (cookie == 2) ||
> +	if ((cookie == 1) || (cookie == 2) ||
>  	    (cookie == 0 && memcmp(readdir->rd_verf.data, zeroverf.data, NFS4_VERIFIER_SIZE)))
>  		return nfserr_bad_cookie;
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-08-09 17:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 15:37 [PATCH 0/4] Series short description Bernd Schubert
2011-08-08 15:37 ` [PATCH 1/4] Add new FMODE flags: FMODE_32bithash and FMODE_64bithash Bernd Schubert
2011-08-08 15:38 ` [PATCH 2/4] Return 32/64-bit dir name hash according to usage type Bernd Schubert
2011-08-08 15:38 ` [PATCH 3/4] RFC: Remove check for a 32-bit cookie in nfsd4_readdir() Bernd Schubert
2011-08-08 15:38   ` Bernd Schubert
2011-08-09 17:31   ` J. Bruce Fields [this message]
2011-08-09 17:39     ` Boaz Harrosh
2011-08-09 18:05       ` J. Bruce Fields
2011-08-08 15:38 ` [PATCH 4/4] nfsd: vfs_llseek() with 32 or 64 bit offsets (hashes) Bernd Schubert
2011-08-08 15:38   ` Bernd Schubert
2011-08-09 17:33   ` J. Bruce Fields
2011-08-10 19:13     ` Bernd Schubert
2011-08-10 19:35       ` J. Bruce Fields
2011-08-08 15:47 ` [PATCH 0/4] 32/64 bit llseek hashes v2 Bernd Schubert
2011-08-08 15:47   ` Bernd Schubert

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=20110809173145.GA16206@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=adilger@whamcloud.com \
    --cc=bernd.schubert@itwm.fraunhofer.de \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=yong.fan@whamcloud.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.