Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/nfs



YAMAMOTO Takashi wrote:

> Module Name:  src
> Committed By: yamt
> Date:         Wed Jun 25 14:37:50 UTC 2003
> 
> Modified Files:
> 
>       src/sys/nfs: nfs.h nfs_socket.c nfs_syscalls.c
> 
> Log Message:
> 
> - instead of scaning a list when looking up
>   {a idle thread, a socket with pending requests},
>   maintain dedicated list of them.
> - add spin locks.

The use of nfsd_slock and a few other variables in sys_nfssvc() int
nfs_syscalls.c gets errors when you configure a kernel with NFS
filesystem but without "options NFSSERVER":

        nfs_syscalls.o: In function `sys_nfssvc':
        nfs_syscalls.o(.text+0x53): undefined reference to 
`nfssvc_sockhead_flag'
        nfs_syscalls.o(.text+0x5b): undefined reference to `nfsd_slock'
        nfs_syscalls.o(.text+0x69): undefined reference to `nfssvc_sockhead'
        nfs_syscalls.o(.text+0x76): undefined reference to 
`nfssvc_sockhead_flag'

I'm not sure from a quick glance what the correct fix is.  Does the
whole block of:

        s = splsoftnet();
        simple_lock(&nfsd_slock);
        while (nfssvc_sockhead_flag & SLP_INIT) {
                 nfssvc_sockhead_flag |= SLP_WANTINIT;
                (void) ltsleep(&nfssvc_sockhead, PSOCK, "nfsd init", 0,
                    &nfsd_slock);
        }
        simple_unlock(&nfsd_slock);
        splx(s);

need to be inside "#ifdef NFSSERVER"?

Simon.
--
Simon Burge                            <simonb%wasabisystems.com@localhost>
NetBSD Support and Service:         http://www.wasabisystems.com/



Home | Main Index | Thread Index | Old Index