From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Brown Subject: Re: mismatch between 2.6.19 and nfs-utils-1.0.10 nfsctl_arg structure??? Date: Wed, 21 Feb 2007 11:04:40 +1100 Message-ID: <17883.35992.171351.381438@notabene.brown> References: <45DB3871.5070604@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: "linux-fsdevel@vger.kernel.org" To: Wouter Batelaan Return-path: Received: from ns.suse.de ([195.135.220.2]:36057 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965258AbXBUAF3 (ORCPT ); Tue, 20 Feb 2007 19:05:29 -0500 In-Reply-To: message from Wouter Batelaan on Tuesday February 20 Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tuesday February 20, wouter.batelaan@nxp.com wrote: > Hi, > > I'm trying to get an nfs server setup on our embedded 2.6.19 kernel > system. I've chosen to use the kernel nfsd module, > and am using the latest nfs-utils. > It all starts running, but I get this: > mount -t nfs 127.0.0.1:/etc /tmp/try > mount: 127.0.0.1:/etc failed, reason given by server: Permission denied > mount: nfsmount failed: Bad file descriptor > mount: Mounting 127.0.0.1:/etc on /tmp/try failed: Bad file descriptor > > Having added a bit of debugging /var/log/messages shows this: > daemon.warn mountd[545]: getfh.c:73: getfh_size (/etc) > daemon.warn mountd[545]: nfsctl.c:26: syscall nfsctl > daemon.warn mountd[545]: nfsctl.c:28: syscall nfsctl => -1 > daemon.warn mountd[545]: getfh failed: Operation not permitted You will need patch f988443a84528bd30c2f474efa5e2c511959f19b [1] or run mount -t nfsd nfsd /proc/fs/nfs/nfsd before starting mountd. > > Looking in detail at the syscall made, I see that the structure > definition for nfsctl_arg is different between kernel and nfs-utils. > > Huh? What am I missing here? Any pointers appreciated. > Wouter. The differences are not significant. NeilBrown [1] http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f988443a84528bd30c2f474efa5e2c511959f19b > > Kernel 2.6.19.1: include/linux/nfsd/syscall.h: > struct nfsctl_arg { > int ca_version; /* safeguard */ > union { > struct nfsctl_svc u_svc; > struct nfsctl_client u_client; > struct nfsctl_export u_export; > struct nfsctl_fdparm u_getfd; > struct nfsctl_fsparm u_getfs; > > void *u_ptr; > } u; > > > nfs-utils 1.0.10: support/include/nfs/nfs.h: > struct nfsctl_arg { > int ca_version; /* safeguard */ > union { > struct nfsctl_svc u_svc; > struct nfsctl_client u_client; > struct nfsctl_export u_export; > struct nfsctl_uidmap u_umap; > struct nfsctl_fhparm u_getfh; > struct nfsctl_fdparm u_getfd; > struct nfsctl_fsparm u_getfs; > } u; > > > > - > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html