Adapt code for our location of the nfs headers, and some updates for
differences in kernel options(4) handling
This commit is contained in:
parent
d687e96a02
commit
3be2222bbe
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_clkrpc.c,v 1.1.1.1 2013/09/30 07:19:04 dholland Exp $ */
|
||||
/* $NetBSD: nfs_clkrpc.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -34,11 +34,13 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clkrpc.c 255216 2013-09-04 22:47:56Z rmacklem "); */
|
||||
__RCSID("$NetBSD: nfs_clkrpc.c,v 1.1.1.1 2013/09/30 07:19:04 dholland Exp $");
|
||||
__RCSID("$NetBSD: nfs_clkrpc.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $");
|
||||
|
||||
#ifdef NOTYET /* _KERNEL_OPT */
|
||||
#include "opt_kgssapi.h"
|
||||
#endif
|
||||
|
||||
#include <fs/nfs/nfsport.h>
|
||||
#include <fs/nfs/common/nfsport.h>
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
#include <rpc/rpcsec_gss.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_clnfsiod.c,v 1.1.1.1 2013/09/30 07:19:30 dholland Exp $ */
|
||||
/* $NetBSD: nfs_clnfsiod.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clnfsiod.c 249630 2013-04-18 23:20:16Z rmacklem "); */
|
||||
__RCSID("$NetBSD: nfs_clnfsiod.c,v 1.1.1.1 2013/09/30 07:19:30 dholland Exp $");
|
||||
__RCSID("$NetBSD: nfs_clnfsiod.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -66,10 +66,10 @@ __RCSID("$NetBSD: nfs_clnfsiod.c,v 1.1.1.1 2013/09/30 07:19:30 dholland Exp $");
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
#include <fs/nfs/nfsport.h>
|
||||
#include <fs/nfsclient/nfsmount.h>
|
||||
#include <fs/nfsclient/nfs.h>
|
||||
#include <fs/nfsclient/nfsnode.h>
|
||||
#include <fs/nfs/common/nfsport.h>
|
||||
#include <fs/nfs/client/nfsmount.h>
|
||||
#include <fs/nfs/client/nfs.h>
|
||||
#include <fs/nfs/client/nfsnode.h>
|
||||
|
||||
extern struct mtx ncl_iod_mutex;
|
||||
extern struct task ncl_nfsiodnew_task;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_clnode.c,v 1.2 2016/11/18 22:58:08 pgoyette Exp $ */
|
||||
/* $NetBSD: nfs_clnode.c,v 1.3 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clnode.c 302210 2016-06-26 14:18:28Z kib "); */
|
||||
__RCSID("$NetBSD: nfs_clnode.c,v 1.2 2016/11/18 22:58:08 pgoyette Exp $");
|
||||
__RCSID("$NetBSD: nfs_clnode.c,v 1.3 2016/12/13 22:17:33 pgoyette Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -52,13 +52,13 @@ __RCSID("$NetBSD: nfs_clnode.c,v 1.2 2016/11/18 22:58:08 pgoyette Exp $");
|
||||
|
||||
#include <vm/uma.h>
|
||||
|
||||
#include <fs/nfs/nfsport.h>
|
||||
#include <fs/nfsclient/nfsnode.h>
|
||||
#include <fs/nfsclient/nfsmount.h>
|
||||
#include <fs/nfsclient/nfs.h>
|
||||
#include <fs/nfsclient/nfs_kdtrace.h>
|
||||
#include <fs/nfs/common/nfsport.h>
|
||||
#include <fs/nfs/client/nfsnode.h>
|
||||
#include <fs/nfs/client/nfsmount.h>
|
||||
#include <fs/nfs/client/nfs.h>
|
||||
#include <fs/nfs/client/nfs_kdtrace.h>
|
||||
|
||||
#include <nfs/nfs_lock.h>
|
||||
#include <fs/nfs/common/nfs_lock.h>
|
||||
|
||||
extern struct vop_vector newnfs_vnodeops;
|
||||
extern struct buf_ops buf_ops_newnfs;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_clport.c,v 1.1.1.2 2016/11/18 07:49:11 pgoyette Exp $ */
|
||||
/* $NetBSD: nfs_clport.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -34,10 +34,12 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clport.c 299413 2016-05-11 06:35:46Z kib "); */
|
||||
__RCSID("$NetBSD: nfs_clport.c,v 1.1.1.2 2016/11/18 07:49:11 pgoyette Exp $");
|
||||
__RCSID("$NetBSD: nfs_clport.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_inet.h"
|
||||
#include "opt_inet6.h"
|
||||
#endif
|
||||
|
||||
#include <sys/capsicum.h>
|
||||
|
||||
@ -46,15 +48,17 @@ __RCSID("$NetBSD: nfs_clport.c,v 1.1.1.2 2016/11/18 07:49:11 pgoyette Exp $");
|
||||
* be the easiest way to handle the port.
|
||||
*/
|
||||
#include <sys/fail.h>
|
||||
|
||||
#include <sys/hash.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <fs/nfs/nfsport.h>
|
||||
#include <fs/nfs/common/nfsport.h>
|
||||
|
||||
#include <netinet/in_fib.h>
|
||||
#include <netinet/if_ether.h>
|
||||
#include <netinet6/ip6_var.h>
|
||||
#include <net/if_types.h>
|
||||
|
||||
#include <fs/nfsclient/nfs_kdtrace.h>
|
||||
#include <fs/nfs/client/nfs_kdtrace.h>
|
||||
|
||||
#ifdef KDTRACE_HOOKS
|
||||
dtrace_nfsclient_attrcache_flush_probe_func_t
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_clrpcops.c,v 1.1.1.2 2016/11/18 07:49:11 pgoyette Exp $ */
|
||||
/* $NetBSD: nfs_clrpcops.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clrpcops.c 298788 2016-04-29 16:07:25Z pfg "); */
|
||||
__RCSID("$NetBSD: nfs_clrpcops.c,v 1.1.1.2 2016/11/18 07:49:11 pgoyette Exp $");
|
||||
__RCSID("$NetBSD: nfs_clrpcops.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $");
|
||||
|
||||
/*
|
||||
* Rpc op calls, generally called from the vnode op calls or through the
|
||||
@ -45,9 +45,11 @@ __RCSID("$NetBSD: nfs_clrpcops.c,v 1.1.1.2 2016/11/18 07:49:11 pgoyette Exp $");
|
||||
*/
|
||||
|
||||
#ifndef APPLEKEXT
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_inet6.h"
|
||||
#endif
|
||||
|
||||
#include <fs/nfs/nfsport.h>
|
||||
#include <fs/nfs/common/nfsport.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
SYSCTL_DECL(_vfs_nfs);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_clstate.c,v 1.3 2016/11/18 08:31:30 pgoyette Exp $ */
|
||||
/* $NetBSD: nfs_clstate.c,v 1.4 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2009 Rick Macklem, University of Guelph
|
||||
* All rights reserved.
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clstate.c 304026 2016-08-12 22:44:59Z rmacklem "); */
|
||||
__RCSID("$NetBSD: nfs_clstate.c,v 1.3 2016/11/18 08:31:30 pgoyette Exp $");
|
||||
__RCSID("$NetBSD: nfs_clstate.c,v 1.4 2016/12/13 22:17:33 pgoyette Exp $");
|
||||
|
||||
/*
|
||||
* These functions implement the client side state handling for NFSv4.
|
||||
@ -81,7 +81,7 @@ __RCSID("$NetBSD: nfs_clstate.c,v 1.3 2016/11/18 08:31:30 pgoyette Exp $");
|
||||
*/
|
||||
|
||||
#ifndef APPLEKEXT
|
||||
#include <fs/nfs/nfsport.h>
|
||||
#include <fs/nfs/common/nfsport.h>
|
||||
|
||||
/*
|
||||
* Global variables
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_clsubs.c,v 1.1.1.2 2016/11/18 07:49:10 pgoyette Exp $ */
|
||||
/* $NetBSD: nfs_clsubs.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clsubs.c 304026 2016-08-12 22:44:59Z rmacklem "); */
|
||||
__RCSID("$NetBSD: nfs_clsubs.c,v 1.1.1.2 2016/11/18 07:49:10 pgoyette Exp $");
|
||||
__RCSID("$NetBSD: nfs_clsubs.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $");
|
||||
|
||||
/*
|
||||
* These functions support the macros and help fiddle mbuf chains for
|
||||
@ -66,11 +66,11 @@ __RCSID("$NetBSD: nfs_clsubs.c,v 1.1.1.2 2016/11/18 07:49:10 pgoyette Exp $");
|
||||
#include <vm/vm_extern.h>
|
||||
#include <vm/uma.h>
|
||||
|
||||
#include <fs/nfs/nfsport.h>
|
||||
#include <fs/nfsclient/nfsnode.h>
|
||||
#include <fs/nfsclient/nfsmount.h>
|
||||
#include <fs/nfsclient/nfs.h>
|
||||
#include <fs/nfsclient/nfs_kdtrace.h>
|
||||
#include <fs/nfs/common/nfsport.h>
|
||||
#include <fs/nfs/client/nfsnode.h>
|
||||
#include <fs/nfs/client/nfsmount.h>
|
||||
#include <fs/nfs/client/nfs.h>
|
||||
#include <fs/nfs/client/nfs_kdtrace.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_clvfsops.c,v 1.1.1.2 2016/11/18 07:49:11 pgoyette Exp $ */
|
||||
/* $NetBSD: nfs_clvfsops.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993, 1995
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -35,11 +35,12 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clvfsops.c 304026 2016-08-12 22:44:59Z rmacklem "); */
|
||||
__RCSID("$NetBSD: nfs_clvfsops.c,v 1.1.1.2 2016/11/18 07:49:11 pgoyette Exp $");
|
||||
__RCSID("$NetBSD: nfs_clvfsops.c,v 1.2 2016/12/13 22:17:33 pgoyette Exp $");
|
||||
|
||||
|
||||
#include "opt_bootp.h"
|
||||
#include "opt_nfsroot.h"
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_newnfs.h"
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -70,11 +71,11 @@ __RCSID("$NetBSD: nfs_clvfsops.c,v 1.1.1.2 2016/11/18 07:49:11 pgoyette Exp $");
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <fs/nfs/nfsport.h>
|
||||
#include <fs/nfsclient/nfsnode.h>
|
||||
#include <fs/nfsclient/nfsmount.h>
|
||||
#include <fs/nfsclient/nfs.h>
|
||||
#include <nfs/nfsdiskless.h>
|
||||
#include <fs/nfs/common/nfsport.h>
|
||||
#include <fs/nfs/client/nfsnode.h>
|
||||
#include <fs/nfs/client/nfsmount.h>
|
||||
#include <fs/nfs/client/nfs.h>
|
||||
#include <fs/nfs/common/nfsdiskless.h>
|
||||
|
||||
FEATURE(nfscl, "NFSv4 client");
|
||||
|
||||
@ -158,7 +159,7 @@ MODULE_DEPEND(nfs, nfslock, 1, 1, 1);
|
||||
* will be defined for kernels built without NFS_ROOT, although it
|
||||
* isn't used in that case.
|
||||
*/
|
||||
#if !defined(NFS_ROOT)
|
||||
#if !defined(NEW_NFS_BOOT)
|
||||
struct nfs_diskless nfs_diskless = { { { 0 } } };
|
||||
struct nfsv3_diskless nfsv3_diskless = { { { 0 } } };
|
||||
int nfs_diskless_valid = 0;
|
||||
@ -405,9 +406,9 @@ nfs_mountroot(struct mount *mp)
|
||||
char buf[128];
|
||||
char *cp;
|
||||
|
||||
#if defined(BOOTP_NFSROOT) && defined(BOOTP)
|
||||
#if defined(NEW_NFS_BOOT) && defined(NEW_NFS_BOOT_BOOTP)
|
||||
bootpc_init(); /* use bootp to get nfs_diskless filled in */
|
||||
#elif defined(NFS_ROOT)
|
||||
#elif defined(NEW_NFS_BOOT)
|
||||
nfs_setup_diskless();
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_clvnops.c,v 1.3 2016/11/18 08:31:30 pgoyette Exp $ */
|
||||
/* $NetBSD: nfs_clvnops.c,v 1.4 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -35,13 +35,16 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
/* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clvnops.c 304026 2016-08-12 22:44:59Z rmacklem "); */
|
||||
__RCSID("$NetBSD: nfs_clvnops.c,v 1.3 2016/11/18 08:31:30 pgoyette Exp $");
|
||||
__RCSID("$NetBSD: nfs_clvnops.c,v 1.4 2016/12/13 22:17:33 pgoyette Exp $");
|
||||
|
||||
/*
|
||||
* vnode op calls for Sun NFS version 2, 3 and 4
|
||||
*/
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_dtrace.h"
|
||||
#include "opt_inet.h"
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -68,17 +71,17 @@ __RCSID("$NetBSD: nfs_clvnops.c,v 1.3 2016/11/18 08:31:30 pgoyette Exp $");
|
||||
#include <vm/vm_extern.h>
|
||||
#include <vm/vm_object.h>
|
||||
|
||||
#include <fs/nfs/nfsport.h>
|
||||
#include <fs/nfsclient/nfsnode.h>
|
||||
#include <fs/nfsclient/nfsmount.h>
|
||||
#include <fs/nfsclient/nfs.h>
|
||||
#include <fs/nfsclient/nfs_kdtrace.h>
|
||||
#include <fs/nfs/common/nfsport.h>
|
||||
#include <fs/nfs/client/nfsnode.h>
|
||||
#include <fs/nfs/client/nfsmount.h>
|
||||
#include <fs/nfs/client/nfs.h>
|
||||
#include <fs/nfs/client/nfs_kdtrace.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_var.h>
|
||||
|
||||
#include <nfs/nfs_lock.h>
|
||||
#include <fs/nfs/common/nfs_lock.h>
|
||||
|
||||
#ifdef KDTRACE_HOOKS
|
||||
#include <sys/dtrace_bsd.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfsmount.h,v 1.2 2016/11/18 22:58:08 pgoyette Exp $ */
|
||||
/* $NetBSD: nfsmount.h,v 1.3 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -31,13 +31,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* FreeBSD: head/sys/fs/nfsclient/nfsmount.h 244042 2012-12-08 22:52:39Z rmacklem
|
||||
* $NetBSD: nfsmount.h,v 1.2 2016/11/18 22:58:08 pgoyette Exp $
|
||||
* $NetBSD: nfsmount.h,v 1.3 2016/12/13 22:17:33 pgoyette Exp $
|
||||
*/
|
||||
|
||||
#ifndef _NFSCLIENT_NFSMOUNT_H_
|
||||
#define _NFSCLIENT_NFSMOUNT_H_
|
||||
|
||||
#include <fs/nfs//common/nfs_mountcommon.h>
|
||||
#include <fs/nfs/common/nfs_mountcommon.h>
|
||||
|
||||
/*
|
||||
* Mount structure.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfsnode.h,v 1.2 2016/11/18 22:58:08 pgoyette Exp $ */
|
||||
/* $NetBSD: nfsnode.h,v 1.3 2016/12/13 22:17:33 pgoyette Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* FreeBSD: head/sys/fs/nfsclient/nfsnode.h 303715 2016-08-03 15:58:20Z kib
|
||||
* $NetBSD: nfsnode.h,v 1.2 2016/11/18 22:58:08 pgoyette Exp $
|
||||
* $NetBSD: nfsnode.h,v 1.3 2016/12/13 22:17:33 pgoyette Exp $
|
||||
*/
|
||||
|
||||
#ifndef _NFSCLIENT_NFSNODE_H_
|
||||
@ -90,7 +90,7 @@ struct nfs_accesscache {
|
||||
* be well aligned and, therefore, tightly packed.
|
||||
*/
|
||||
struct nfsnode {
|
||||
struct mtx n_mtx; /* Protects all of these members */
|
||||
kmutex_t n_mtx; /* Protects all of these members */
|
||||
u_quad_t n_size; /* Current size of file */
|
||||
u_quad_t n_brev; /* Modify rev when cached */
|
||||
u_quad_t n_lrev; /* Modify rev for lease */
|
||||
|
Loading…
Reference in New Issue
Block a user