nfs_serv.c (177493) | nfs_serv.c (177599) |
---|---|
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 --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)nfs_serv.c 8.8 (Berkeley) 7/31/95 33 */ 34 35#include <sys/cdefs.h> | 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 --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)nfs_serv.c 8.8 (Berkeley) 7/31/95 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/nfsserver/nfs_serv.c 177493 2008-03-22 09:15:16Z jeff $"); | 36__FBSDID("$FreeBSD: head/sys/nfsserver/nfs_serv.c 177599 2008-03-25 09:39:02Z ru $"); |
37 38/* 39 * nfs version 2 and 3 server calls to vnode ops 40 * - these routines generally have 3 phases 41 * 1 - break down and validate rpc request in mbuf list 42 * 2 - do the vnode ops for the request 43 * (surprisingly ?? many are very similar to syscalls in vfs_syscalls.c) 44 * 3 - build the rpc reply in an mbuf list --- 636 unchanged lines hidden (view full) --- 681 mp = NULL; 682#endif 683 mp3 = NULL; 684 fhp = &nfh.fh_generic; 685 nfsm_srvmtofh(fhp); 686 len = 0; 687 i = 0; 688 while (len < NFS_MAXPATHLEN) { | 37 38/* 39 * nfs version 2 and 3 server calls to vnode ops 40 * - these routines generally have 3 phases 41 * 1 - break down and validate rpc request in mbuf list 42 * 2 - do the vnode ops for the request 43 * (surprisingly ?? many are very similar to syscalls in vfs_syscalls.c) 44 * 3 - build the rpc reply in an mbuf list --- 636 unchanged lines hidden (view full) --- 681 mp = NULL; 682#endif 683 mp3 = NULL; 684 fhp = &nfh.fh_generic; 685 nfsm_srvmtofh(fhp); 686 len = 0; 687 i = 0; 688 while (len < NFS_MAXPATHLEN) { |
689 MGET(nmp, M_TRYWAIT, MT_DATA); 690 MCLGET(nmp, M_TRYWAIT); | 689 MGET(nmp, M_WAIT, MT_DATA); 690 MCLGET(nmp, M_WAIT); |
691 nmp->m_len = NFSMSIZ(nmp); 692 if (len == 0) 693 mp3 = mp = nmp; 694 else { 695 mp->m_next = nmp; 696 mp = nmp; 697 } 698 if ((len + mp->m_len) > NFS_MAXPATHLEN) { --- 231 unchanged lines hidden (view full) --- 930 m = m2 = mb; 931 while (left > 0) { 932 siz = min(M_TRAILINGSPACE(m), left); 933 if (siz > 0) { 934 left -= siz; 935 i++; 936 } 937 if (left > 0) { | 691 nmp->m_len = NFSMSIZ(nmp); 692 if (len == 0) 693 mp3 = mp = nmp; 694 else { 695 mp->m_next = nmp; 696 mp = nmp; 697 } 698 if ((len + mp->m_len) > NFS_MAXPATHLEN) { --- 231 unchanged lines hidden (view full) --- 930 m = m2 = mb; 931 while (left > 0) { 932 siz = min(M_TRAILINGSPACE(m), left); 933 if (siz > 0) { 934 left -= siz; 935 i++; 936 } 937 if (left > 0) { |
938 MGET(m, M_TRYWAIT, MT_DATA); 939 MCLGET(m, M_TRYWAIT); | 938 MGET(m, M_WAIT, MT_DATA); 939 MCLGET(m, M_WAIT); |
940 m->m_len = 0; 941 m2->m_next = m; 942 m2 = m; 943 } 944 } 945 MALLOC(iv, struct iovec *, i * sizeof (struct iovec), 946 M_TEMP, M_WAITOK); 947 uiop->uio_iov = iv2 = iv; --- 3340 unchanged lines hidden --- | 940 m->m_len = 0; 941 m2->m_next = m; 942 m2 = m; 943 } 944 } 945 MALLOC(iv, struct iovec *, i * sizeof (struct iovec), 946 M_TEMP, M_WAITOK); 947 uiop->uio_iov = iv2 = iv; --- 3340 unchanged lines hidden --- |