cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [GFS2 patch] NFS filehandle check
@ 2007-02-06 23:52 Wendy Cheng
  2007-02-07 10:31 ` Steven Whitehouse
  2007-02-23  5:21 ` Wendy Cheng
  0 siblings, 2 replies; 6+ messages in thread
From: Wendy Cheng @ 2007-02-06 23:52 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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]);




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cluster-devel] [GFS2 patch] NFS filehandle check
  2007-02-06 23:52 [Cluster-devel] [GFS2 patch] NFS filehandle check Wendy Cheng
@ 2007-02-07 10:31 ` Steven Whitehouse
  2007-02-07 22:23   ` Wendy Cheng
  2007-02-23  5:21 ` Wendy Cheng
  1 sibling, 1 reply; 6+ messages in thread
From: Steven Whitehouse @ 2007-02-07 10:31 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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]);
> 
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cluster-devel] [GFS2 patch] NFS filehandle check
  2007-02-07 10:31 ` Steven Whitehouse
@ 2007-02-07 22:23   ` Wendy Cheng
  2007-02-08  9:12     ` Steven Whitehouse
  0 siblings, 1 reply; 6+ messages in thread
From: Wendy Cheng @ 2007-02-07 22:23 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On Wed, 2007-02-07 at 10:31 +0000, Steven Whitehouse wrote:
> Hi,
> 
> Did you intend to leave that printk in there?

Yes .. will that be an issue ? 

BTW, GFS2 can't support NFS V2 at this moment (since its max fh size is
32 bytes while GFS2 requires 40 bytes fh).

-- Wendy





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cluster-devel] [GFS2 patch] NFS filehandle check
  2007-02-07 22:23   ` Wendy Cheng
@ 2007-02-08  9:12     ` Steven Whitehouse
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Whitehouse @ 2007-02-08  9:12 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

On Wed, 2007-02-07 at 17:23 -0500, Wendy Cheng wrote:
> On Wed, 2007-02-07 at 10:31 +0000, Steven Whitehouse wrote:
> > Hi,
> > 
> > Did you intend to leave that printk in there?
> 
> Yes .. will that be an issue ? 
> 
I presume that it doesn't trigger in normal use? or at least the thing
I'm worried about is that we'll fill up peoples logs if this happens too
often.

> BTW, GFS2 can't support NFS V2 at this moment (since its max fh size is
> 32 bytes while GFS2 requires 40 bytes fh).
> 
> -- Wendy
> 
Ok, we might be able to make some changes there I think,

Steve.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cluster-devel] [GFS2 patch] NFS filehandle check
  2007-02-06 23:52 [Cluster-devel] [GFS2 patch] NFS filehandle check Wendy Cheng
  2007-02-07 10:31 ` Steven Whitehouse
@ 2007-02-23  5:21 ` Wendy Cheng
  2007-02-23 11:46   ` Steven Whitehouse
  1 sibling, 1 reply; 6+ messages in thread
From: Wendy Cheng @ 2007-02-23  5:21 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Steve,

I removed the printk.....

Wendy
---


-------------- next part --------------
A non-text attachment was scrubbed...
Name: gfs2_fh.patch
Type: text/x-patch
Size: 925 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070223/9e82c208/attachment.bin>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Cluster-devel] [GFS2 patch] NFS filehandle check
  2007-02-23  5:21 ` Wendy Cheng
@ 2007-02-23 11:46   ` Steven Whitehouse
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Whitehouse @ 2007-02-23 11:46 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

On Fri, 2007-02-23 at 00:21 -0500, Wendy Cheng wrote:
> Steve,
> 
> I removed the printk.....
> 
> Wendy
> ---
> 
> 

Now applied to the git tree. Thanks,

Steve.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-02-23 11:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-06 23:52 [Cluster-devel] [GFS2 patch] NFS filehandle check Wendy Cheng
2007-02-07 10:31 ` Steven Whitehouse
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

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).