NFS root mounting in 2.4.1...
...fails on ARM with ESTALE (116):
Looking up port of RPC 100003/2 on 192.168.0.4 Looking up port of RPC 100005/2 on 192.168.0.4nfs_get_root: getattr error = 116nfs_read_super: get root inode failed
VFS: Unable to mount root fs via NFS, trying floppy.
It seems to be related to these two compiler warnings:
gcc -D__KERNEL__ -I/usr/src/v2.4/linux-ebsa110/include -Wall
-Wstrict-prototypes -O2 -fno-strict-aliasing -fno-common
-pipe -mapcs-32 -march=armv4 -mtune=strongarm110 -mshort-load-bytes -msoft-float -c -o nfsroot.o nfsroot.cnfsroot.c: In function `root_nfs_get_handle':
nfsroot.c:444: warning: passing arg 3 of nfs3_mount' from incompatible pointer type nfsroot.c:446: warning: passing arg 3 of nfs_mount' from incompatible pointer type
The following patch changes every instance of nfs_fh in nfs_mount to be nfs3_fh. This makes NFS root mounting again a possibility on ARM.
fs/nfs/mount_clnt.c +7 -7
@@ -31,32 +31,32 @@*/ static int nfs_gen_mount (struct sockaddr_in *, -char *,struct nfs_fh *,int ); +char *,struct nfs3_fh *,int );static struct rpc_clnt *mnt_create (char *,struct sockaddr_in *,int );extern struct rpc_program mnt_program;struct mnt_fhstatus {unsigned int status; -struct nfs_fh * fh; +struct nfs3_fh * fh; };/* * Obtain an NFS file handle for the given host and path */ int -nfs_mount (struct sockaddr_in *addr,char *path,struct nfs_fh *fh) +nfs_mount (struct sockaddr_in *addr,char *path,struct nfs3_fh *fh) {return nfs_gen_mount (addr, path, fh,NFS_MNT_VERSION ); }int -nfs3_mount (struct sockaddr_in *addr,char *path,struct nfs_fh *fh) +nfs3_mount (struct sockaddr_in *addr,char *path,struct nfs3_fh *fh) {return nfs_gen_mount (addr, path, fh,NFS_MNT3_VERSION ); }static int -nfs_gen_mount (struct sockaddr_in *addr,char *path,struct nfs_fh *fh,int version) +nfs_gen_mount (struct sockaddr_in *addr,char *path,struct nfs3_fh *fh,int version) {struct rpc_clnt *mnt_clnt;struct mnt_fhstatus result = {0 , fh };
@@ -120,7 +120,7 @@static int xdr_decode_fhstatus (struct rpc_rqst *req,u32 *p,struct mnt_fhstatus *res) { -struct nfs_fh *fh = res->fh; +struct nfs3_fh *fh = res->fh;memset ((void *)fh,0 ,sizeof (*fh));if ((res->status =ntohl (*p++)) ==0 ) {
@@ -133,7 +133,7 @@static int xdr_decode_fhstatus3 (struct rpc_rqst *req,u32 *p,struct mnt_fhstatus *res) { -struct nfs_fh *fh = res->fh; +struct nfs3_fh *fh = res->fh;memset ((void *)fh,0 ,sizeof (*fh));if ((res->status =ntohl (*p++)) ==0 ) {
include/linux/nfs_fs.h +2 -2
@@ -260,8 +260,8 @@* linux/fs/mount_clnt.c * (Used only by nfsroot module) */ -extern int nfs_mount (struct sockaddr_in *,char *,struct nfs_fh *); -extern int nfs3_mount (struct sockaddr_in *,char *,struct nfs_fh *); +extern int nfs_mount (struct sockaddr_in *,char *,struct nfs3_fh *); +extern int nfs3_mount (struct sockaddr_in *,char *,struct nfs3_fh *);/* * inline functions
--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
" " == Russell King <[email protected]> writes:
> ...fails on ARM with ESTALE (116): Looking up port of RPC > 100003/2 on 192.168.0.4 Looking up port of RPC 100005/2 on > 192.168.0.4 nfs_get_root: getattr error = 116 nfs_read_super:
> get root inode failed VFS: Unable to mount root fs via NFS, > trying floppy.
Thanks. I'll update the NFS ARM filehandle patch in the course of today.
Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/