[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] [GFS2 Patch] pass formal ino in do_filldir_main


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,


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 <wcheng redhat com>
> 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;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]