[Cluster-devel] [GFS2 patch] NFS filehandle check
Wendy Cheng
wcheng at redhat.com
Tue Feb 6 23:52:04 UTC 2007
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 at 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]);
More information about the Cluster-devel
mailing list