Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsserver/nfs_fha_new.c
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 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; | |||||
NFSD_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 = &NFSD_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 |