From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Wed, 07 Feb 2007 10:49:30 +0000 Subject: [Cluster-devel] [GFS2 Patch] pass formal ino in do_filldir_main In-Reply-To: <1170823892.3414.3.camel@d-cthon07-w-63.Connectathon.ORG> References: <1170823892.3414.3.camel@d-cthon07-w-63.Connectathon.ORG> Message-ID: <1170845370.11001.417.camel@quoit.chygwyn.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I'm not sure that this is the right fix. no_formal_ino is used only as a hash value in the lookup, the "real" lookup is always via no_addr. So we can alter that hash if required to just use no_addr, but I'd rather not have to return no_formal_ino here since we have no way to map that back to the disk location of the inode in general. In fact given a maximum sized GFS2 filesystem and enough nodes to fill it with inodes in a reasonable time (yes, I know thats a lot and a long time!), its not even certain to be unique, Steve. On Tue, 2007-02-06 at 23:51 -0500, Wendy Cheng wrote: > Lookup failure found in '07 NFS connectathon. The nfsd is in the middle > of readdirplus procedure call where it builds the file handles > associated with the directory. GFS2 lookup code has been expected the > first 64 bit of gfs2 inode number (formal inode number) but > do_filldir_main() wrongly passes on-disk address inode number (no_addr). > This patch fixes this. > > Signed-off-by: S. Wendy Cheng > > dir.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletion(-) > > --- linux-git/fs/gfs2/dir.c 2007-02-06 01:07:26.000000000 -0500 > +++ linux/fs/gfs2/dir.c 2007-02-06 20:50:16.000000000 -0500 > @@ -1241,8 +1241,9 @@ static int do_filldir_main(struct gfs2_i > > error = filldir(opaque, (const char *)(dent + 1), > be16_to_cpu(dent->de_name_len), > - off, be64_to_cpu(dent->de_inum.no_addr), > + off, be64_to_cpu(dent->de_inum.no_formal_ino), > be16_to_cpu(dent->de_type)); > + > if (error) > return 1; > > >