mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: linux-kernel@vger.kernel.org, trond.myklebust@fys.uio.no
Subject: NFS root mounting in 2.4.1...
Date: Thu, 1 Feb 2001 00:03:47 +0000 (GMT)	[thread overview]
Message-ID: <200102010003.f1103ll11665@flint.arm.linux.org.uk> (raw)

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


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.c
nfsroot.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.

diff -ur -x .* -x *.[oas] orig/fs/nfs/mount_clnt.c linux/fs/nfs/mount_clnt.c
--- orig/fs/nfs/mount_clnt.c	Thu Apr 27 20:44:34 2000
+++ linux/fs/nfs/mount_clnt.c	Wed Jan 31 23:53:21 2001
@@ -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) {
diff -ur -x .* -x *.[oas] orig/include/linux/nfs_fs.h linux/include/linux/nfs_fs.h
--- orig/include/linux/nfs_fs.h	Tue Jan 30 16:11:15 2001
+++ linux/include/linux/nfs_fs.h	Wed Jan 31 23:53:56 2001
@@ -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 (rmk@arm.linux.org.uk)                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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

             reply	other threads:[~2001-02-01  0:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-01  0:03 Russell King [this message]
2001-02-01  8:15 ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200102010003.f1103ll11665@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®