Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsserver/nfs_fha_new.c
Show All 28 Lines | |||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
#include <sys/sbuf.h> | #include <sys/sbuf.h> | ||||
#include <fs/nfs/nfsport.h> | #include <fs/nfs/nfsport.h> | ||||
#include <fs/nfs/nfsdvnet.h> | |||||
#include <fs/nfsserver/nfs_fha_new.h> | #include <fs/nfsserver/nfs_fha_new.h> | ||||
#include <rpc/rpc.h> | #include <rpc/rpc.h> | ||||
static MALLOC_DEFINE(M_NFS_FHA, "NFS FHA", "NFS FHA"); | static MALLOC_DEFINE(M_NFS_FHA, "NFS FHA", "NFS FHA"); | ||||
static void fhanew_init(void *foo); | static void fhanew_init(void *foo); | ||||
static void fhanew_uninit(void *foo); | static void fhanew_uninit(void *foo); | ||||
Show All 11 Lines | |||||
static void fha_extract_info(struct svc_req *req, | static void fha_extract_info(struct svc_req *req, | ||||
struct fha_info *i); | struct fha_info *i); | ||||
static struct fha_params fhanew_softc; | static struct fha_params fhanew_softc; | ||||
SYSCTL_DECL(_vfs_nfsd); | SYSCTL_DECL(_vfs_nfsd); | ||||
extern int newnfs_nfsv3_procid[]; | extern int newnfs_nfsv3_procid[]; | ||||
extern SVCPOOL *nfsrvd_pool; | |||||
VNET_DECLARE(SVCPOOL *, nfsrvd_pool); | |||||
SYSINIT(nfs_fhanew, SI_SUB_ROOT_CONF, SI_ORDER_ANY, fhanew_init, NULL); | SYSINIT(nfs_fhanew, SI_SUB_ROOT_CONF, SI_ORDER_ANY, fhanew_init, NULL); | ||||
SYSUNINIT(nfs_fhanew, SI_SUB_ROOT_CONF, SI_ORDER_ANY, fhanew_uninit, NULL); | SYSUNINIT(nfs_fhanew, SI_SUB_ROOT_CONF, SI_ORDER_ANY, fhanew_uninit, NULL); | ||||
static void | static void | ||||
fhanew_init(void *foo) | fhanew_init(void *foo) | ||||
{ | { | ||||
struct fha_params *softc; | struct fha_params *softc; | ||||
int i; | int i; | ||||
softc = &fhanew_softc; | softc = &fhanew_softc; | ||||
bzero(softc, sizeof(*softc)); | bzero(softc, sizeof(*softc)); | ||||
snprintf(softc->server_name, sizeof(softc->server_name), | snprintf(softc->server_name, sizeof(softc->server_name), | ||||
FHANEW_SERVER_NAME); | FHANEW_SERVER_NAME); | ||||
softc->pool = &nfsrvd_pool; | softc->pool = &VNET(nfsrvd_pool); | ||||
/* | /* | ||||
* Initialize the sysctl context list for the fha module. | * Initialize the sysctl context list for the fha module. | ||||
*/ | */ | ||||
sysctl_ctx_init(&softc->sysctl_ctx); | sysctl_ctx_init(&softc->sysctl_ctx); | ||||
softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, | softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, | ||||
SYSCTL_STATIC_CHILDREN(_vfs_nfsd), OID_AUTO, "fha", | SYSCTL_STATIC_CHILDREN(_vfs_nfsd), OID_AUTO, "fha", | ||||
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "NFS File Handle Affinity (FHA)"); | CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "NFS File Handle Affinity (FHA)"); | ||||
▲ Show 20 Lines • Show All 620 Lines • Show Last 20 Lines |