nfs_nfsiod.c (30994) | nfs_nfsiod.c (31016) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 |
37 * $Id: nfs_syscalls.c,v 1.30 1997/10/28 15:59:11 bde Exp $ | 37 * $Id: nfs_syscalls.c,v 1.31 1997/11/06 19:29:42 phk Exp $ |
38 */ 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/sysproto.h> 43#include <sys/kernel.h> 44#include <sys/sysctl.h> 45#include <sys/file.h> --- 553 unchanged lines hidden (view full) --- 599 } else if (nfsd->nfsd_flag & NFSD_AUTHFAIL) { 600 nfsd->nfsd_flag &= ~NFSD_AUTHFAIL; 601 nd->nd_procnum = NFSPROC_NOOP; 602 nd->nd_repstat = (NFSERR_AUTHERR | AUTH_TOOWEAK); 603 cacherep = RC_DOIT; 604 } else if (nfs_privport) { 605 /* Check if source port is privileged */ 606 u_short port; | 38 */ 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/sysproto.h> 43#include <sys/kernel.h> 44#include <sys/sysctl.h> 45#include <sys/file.h> --- 553 unchanged lines hidden (view full) --- 599 } else if (nfsd->nfsd_flag & NFSD_AUTHFAIL) { 600 nfsd->nfsd_flag &= ~NFSD_AUTHFAIL; 601 nd->nd_procnum = NFSPROC_NOOP; 602 nd->nd_repstat = (NFSERR_AUTHERR | AUTH_TOOWEAK); 603 cacherep = RC_DOIT; 604 } else if (nfs_privport) { 605 /* Check if source port is privileged */ 606 u_short port; |
607 u_long addr; | |
608 struct sockaddr *nam = nd->nd_nam; 609 struct sockaddr_in *sin; 610 611 sin = (struct sockaddr_in *)nam; 612 port = ntohs(sin->sin_port); 613 if (port >= IPPORT_RESERVED && 614 nd->nd_procnum != NFSPROC_NULL) { 615 nd->nd_procnum = NFSPROC_NOOP; --- 136 unchanged lines hidden (view full) --- 752 * Asynchronous I/O daemons for client nfs. 753 * They do read-ahead and write-behind operations on the block I/O cache. 754 * Never returns unless it fails or gets killed. 755 */ 756static int 757nfssvc_iod(p) 758 struct proc *p; 759{ | 607 struct sockaddr *nam = nd->nd_nam; 608 struct sockaddr_in *sin; 609 610 sin = (struct sockaddr_in *)nam; 611 port = ntohs(sin->sin_port); 612 if (port >= IPPORT_RESERVED && 613 nd->nd_procnum != NFSPROC_NULL) { 614 nd->nd_procnum = NFSPROC_NOOP; --- 136 unchanged lines hidden (view full) --- 751 * Asynchronous I/O daemons for client nfs. 752 * They do read-ahead and write-behind operations on the block I/O cache. 753 * Never returns unless it fails or gets killed. 754 */ 755static int 756nfssvc_iod(p) 757 struct proc *p; 758{ |
760 register struct buf *bp, *nbp; | 759 register struct buf *bp; |
761 register int i, myiod; | 760 register int i, myiod; |
762 struct vnode *vp; | |
763 struct nfsmount *nmp; | 761 struct nfsmount *nmp; |
764 int error = 0, s; | 762 int error = 0; |
765 766 /* 767 * Assign my position or return error if too many already running 768 */ 769 myiod = -1; 770 for (i = 0; i < NFS_MAXASYNCDAEMON; i++) 771 if (nfs_asyncdaemon[i] == 0) { 772 nfs_asyncdaemon[i]++; --- 64 unchanged lines hidden (view full) --- 837static void 838nfsrv_zapsock(slp) 839 register struct nfssvc_sock *slp; 840{ 841 register struct nfsuid *nuidp, *nnuidp; 842 register struct nfsrv_descript *nwp, *nnwp; 843 struct socket *so; 844 struct file *fp; | 763 764 /* 765 * Assign my position or return error if too many already running 766 */ 767 myiod = -1; 768 for (i = 0; i < NFS_MAXASYNCDAEMON; i++) 769 if (nfs_asyncdaemon[i] == 0) { 770 nfs_asyncdaemon[i]++; --- 64 unchanged lines hidden (view full) --- 835static void 836nfsrv_zapsock(slp) 837 register struct nfssvc_sock *slp; 838{ 839 register struct nfsuid *nuidp, *nnuidp; 840 register struct nfsrv_descript *nwp, *nnwp; 841 struct socket *so; 842 struct file *fp; |
845 struct mbuf *m; | |
846 struct nfsrv_rec *rec; 847 int s; 848 849 slp->ns_flag &= ~SLP_ALLFLAGS; 850 fp = slp->ns_fp; 851 if (fp) { 852 slp->ns_fp = (struct file *)0; 853 so = slp->ns_so; --- 339 unchanged lines hidden --- | 843 struct nfsrv_rec *rec; 844 int s; 845 846 slp->ns_flag &= ~SLP_ALLFLAGS; 847 fp = slp->ns_fp; 848 if (fp) { 849 slp->ns_fp = (struct file *)0; 850 so = slp->ns_so; --- 339 unchanged lines hidden --- |