cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 patch] NFS filehandle check
Date: Wed, 07 Feb 2007 10:31:55 +0000	[thread overview]
Message-ID: <1170844315.11001.410.camel@quoit.chygwyn.com> (raw)
In-Reply-To: <1170805924.3850.2.camel@d-cthon07-w-63.Connectathon.ORG>

Hi,

Did you intend to leave that printk in there?

Steve.

On Tue, 2007-02-06 at 18:52 -0500, Wendy Cheng wrote:
> File handle checking error found in '07 NFS connectathon. The fh_type
> and fh_len are not necessarily identical. Some of the client machines
> could fail mount with stale filehandle without this patch. 
> 
> Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>
> 
>  ops_export.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> --- linux-git/fs/gfs2/ops_export.c	2007-02-06 01:07:26.000000000 -0500
> +++ linux/fs/gfs2/ops_export.c	2007-02-06 18:10:08.000000000 -0500
> @@ -39,14 +39,15 @@ static struct dentry *gfs2_decode_fh(str
>  	struct gfs2_fh_obj fh_obj;
>  	struct gfs2_inum_host *this, parent;
>  
> -	if (fh_type != fh_len)
> -		return NULL;
> -
>  	this 		= &fh_obj.this;
>  	fh_obj.imode 	= DT_UNKNOWN;
>  	memset(&parent, 0, sizeof(struct gfs2_inum));
>  
> -	switch (fh_type) {
> +	if (fh_type != fh_len) {
> +                printk("warning: fh_type=%d != fh_len=%d\n", fh_type,
> fh_len);
> +        }
> +
> +	switch (fh_len) {
>  	case GFS2_LARGE_FH_SIZE:
>  		parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32;
>  		parent.no_formal_ino |= be32_to_cpu(fh[5]);
> 
> 



  reply	other threads:[~2007-02-07 10:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06 23:52 [Cluster-devel] [GFS2 patch] NFS filehandle check Wendy Cheng
2007-02-07 10:31 ` Steven Whitehouse [this message]
2007-02-07 22:23   ` Wendy Cheng
2007-02-08  9:12     ` Steven Whitehouse
2007-02-23  5:21 ` Wendy Cheng
2007-02-23 11:46   ` Steven Whitehouse

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=1170844315.11001.410.camel@quoit.chygwyn.com \
    --to=swhiteho@redhat.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).