Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsclient/nfs_clport.c
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | |||||
uint32_t nfscl_attrcache_load_done_id; | uint32_t nfscl_attrcache_load_done_id; | ||||
#endif /* !KDTRACE_HOOKS */ | #endif /* !KDTRACE_HOOKS */ | ||||
extern u_int32_t newnfs_true, newnfs_false, newnfs_xdrneg1; | extern u_int32_t newnfs_true, newnfs_false, newnfs_xdrneg1; | ||||
extern struct vop_vector newnfs_vnodeops; | extern struct vop_vector newnfs_vnodeops; | ||||
extern struct vop_vector newnfs_fifoops; | extern struct vop_vector newnfs_fifoops; | ||||
extern uma_zone_t newnfsnode_zone; | extern uma_zone_t newnfsnode_zone; | ||||
extern struct buf_ops buf_ops_newnfs; | extern struct buf_ops buf_ops_newnfs; | ||||
extern int ncl_pbuf_freecnt; | extern uma_zone_t ncl_pbuf_zone; | ||||
extern short nfsv4_cbport; | extern short nfsv4_cbport; | ||||
extern int nfscl_enablecallb; | extern int nfscl_enablecallb; | ||||
extern int nfs_numnfscbd; | extern int nfs_numnfscbd; | ||||
extern int nfscl_inited; | extern int nfscl_inited; | ||||
struct mtx ncl_iod_mutex; | struct mtx ncl_iod_mutex; | ||||
NFSDLOCKMUTEX; | NFSDLOCKMUTEX; | ||||
extern struct mtx nfsrv_dslock_mtx; | extern struct mtx nfsrv_dslock_mtx; | ||||
▲ Show 20 Lines • Show All 927 Lines • ▼ Show 20 Lines | |||||
nfscl_init(void) | nfscl_init(void) | ||||
{ | { | ||||
static int inited = 0; | static int inited = 0; | ||||
if (inited) | if (inited) | ||||
return; | return; | ||||
inited = 1; | inited = 1; | ||||
nfscl_inited = 1; | nfscl_inited = 1; | ||||
ncl_pbuf_freecnt = nswbuf / 2 + 1; | ncl_pbuf_zone = uma_zsecond_create("nfspbuf", pbuf_ctor, pbuf_dtor, | ||||
pbuf_init, NULL, pbuf_zone); | |||||
uma_zone_set_max(ncl_pbuf_zone, nswbuf / 2 + 1); | |||||
} | } | ||||
/* | /* | ||||
* Check each of the attributes to be set, to ensure they aren't already | * Check each of the attributes to be set, to ensure they aren't already | ||||
* the correct value. Disable setting ones already correct. | * the correct value. Disable setting ones already correct. | ||||
*/ | */ | ||||
int | int | ||||
nfscl_checksattr(struct vattr *vap, struct nfsvattr *nvap) | nfscl_checksattr(struct vattr *vap, struct nfsvattr *nvap) | ||||
▲ Show 20 Lines • Show All 317 Lines • ▼ Show 20 Lines | case MOD_UNLOAD: | ||||
} | } | ||||
/* | /* | ||||
* XXX: Unloading of nfscl module is unsupported. | * XXX: Unloading of nfscl module is unsupported. | ||||
*/ | */ | ||||
#if 0 | #if 0 | ||||
ncl_call_invalcaches = NULL; | ncl_call_invalcaches = NULL; | ||||
nfsd_call_nfscl = NULL; | nfsd_call_nfscl = NULL; | ||||
uma_zdestroy(ncl_pbuf_zone); | |||||
/* and get rid of the mutexes */ | /* and get rid of the mutexes */ | ||||
mtx_destroy(&ncl_iod_mutex); | mtx_destroy(&ncl_iod_mutex); | ||||
loaded = 0; | loaded = 0; | ||||
break; | break; | ||||
#else | #else | ||||
/* FALLTHROUGH */ | /* FALLTHROUGH */ | ||||
#endif | #endif | ||||
default: | default: | ||||
Show All 19 Lines |