Lines Matching refs:ne

124 	nfs_export_t *ne = ng->nfs_export;  in nfs_get_export()  local
125 ASSERT(ne != NULL); in nfs_get_export()
126 return (ne); in nfs_get_export()
716 srv_secinfo_treeclimb(nfs_export_t *ne, exportinfo_t *exip, secinfo_t *sec, in srv_secinfo_treeclimb() argument
721 ASSERT(RW_WRITE_HELD(&ne->exported_lock)); in srv_secinfo_treeclimb()
731 ASSERT(exip == ne->exi_root); in srv_secinfo_treeclimb()
807 export_link(nfs_export_t *ne, exportinfo_t *exi) in export_link() argument
811 ASSERT(RW_WRITE_HELD(&ne->exported_lock)); in export_link()
813 bckt = &ne->exptable[exptablehash(&exi->exi_fsid, &exi->exi_fid)]; in export_link()
816 bckt = &ne->exptable_path_hash[pkp_tab_hash(exi->exi_export.ex_path, in export_link()
819 exi->exi_ne = ne; in export_link()
871 nfs_export_t *ne = g->nfs_export; in nfs_export_get_rootfh() local
874 ne->exi_rootfid.fid_len = MAXFIDSZ; in nfs_export_get_rootfh()
875 err = vop_fid_pseudo(ne->exi_root->exi_vp, &ne->exi_rootfid); in nfs_export_get_rootfh()
877 ne->exi_rootfid.fid_len = 0; in nfs_export_get_rootfh()
882 ne->exi_root->exi_fh.fh_fsid = rootdir->v_vfsp->vfs_fsid; in nfs_export_get_rootfh()
883 ne->exi_root->exi_fh.fh_xlen = ne->exi_rootfid.fid_len; in nfs_export_get_rootfh()
884 bcopy(ne->exi_rootfid.fid_data, ne->exi_root->exi_fh.fh_xdata, in nfs_export_get_rootfh()
885 ne->exi_rootfid.fid_len); in nfs_export_get_rootfh()
886 ne->exi_root->exi_fh.fh_len = sizeof (ne->exi_root->exi_fh.fh_data); in nfs_export_get_rootfh()
895 nfs_export_t *ne; in nfs_export_zone_init() local
898 ne = kmem_zalloc(sizeof (*ne), KM_SLEEP); in nfs_export_zone_init()
900 rw_init(&ne->exported_lock, NULL, RW_DEFAULT, NULL); in nfs_export_zone_init()
902 ne->ne_globals = ng; /* "up" pointer */ in nfs_export_zone_init()
908 ne->exi_root = kmem_zalloc(sizeof (*ne->exi_root), KM_SLEEP); in nfs_export_zone_init()
909 ne->exi_public = ne->exi_root; in nfs_export_zone_init()
911 ne->exi_root->exi_export.ex_flags = EX_PUBLIC; in nfs_export_zone_init()
912 ne->exi_root->exi_export.ex_pathlen = 1; /* length of "/" */ in nfs_export_zone_init()
913 ne->exi_root->exi_export.ex_path = in nfs_export_zone_init()
914 kmem_alloc(ne->exi_root->exi_export.ex_pathlen + 1, KM_SLEEP); in nfs_export_zone_init()
915 ne->exi_root->exi_export.ex_path[0] = '/'; in nfs_export_zone_init()
916 ne->exi_root->exi_export.ex_path[1] = '\0'; in nfs_export_zone_init()
918 ne->exi_root->exi_count = 1; in nfs_export_zone_init()
919 mutex_init(&ne->exi_root->exi_lock, NULL, MUTEX_DEFAULT, NULL); in nfs_export_zone_init()
932 ne->exi_root->exi_vp = zone->zone_rootvp; in nfs_export_zone_init()
933 ne->exi_root->exi_zoneid = ng->nfs_zoneid; in nfs_export_zone_init()
942 ne->exi_root->exi_cache[i] = kmem_alloc(sizeof (avl_tree_t), in nfs_export_zone_init()
944 avl_create(ne->exi_root->exi_cache[i], in nfs_export_zone_init()
948 rw_init(&ne->exi_root->exi_cache_lock, NULL, RW_DEFAULT, NULL); in nfs_export_zone_init()
952 rw_enter(&ne->exported_lock, RW_WRITER); in nfs_export_zone_init()
955 export_link(ne, ne->exi_root); in nfs_export_zone_init()
959 ne->exi_root->exi_id = exi_id_get_next(); in nfs_export_zone_init()
960 avl_add(&exi_id_tree, ne->exi_root); in nfs_export_zone_init()
963 rw_exit(&ne->exported_lock); in nfs_export_zone_init()
964 ne->ns_root = NULL; in nfs_export_zone_init()
966 ng->nfs_export = ne; in nfs_export_zone_init()
975 nfs_export_t *ne = ng->nfs_export; in nfs_export_zone_shutdown() local
987 rw_enter(&ne->exported_lock, RW_READER); in nfs_export_zone_shutdown()
992 exi = ne->exptable[i]; in nfs_export_zone_shutdown()
1006 rw_exit(&ne->exported_lock); in nfs_export_zone_shutdown()
1012 if (exi != ne->exi_root && in nfs_export_zone_shutdown()
1013 unexport(ne, exi, cr) != 0) in nfs_export_zone_shutdown()
1017 rw_enter(&ne->exported_lock, RW_READER); in nfs_export_zone_shutdown()
1026 rw_exit(&ne->exported_lock); in nfs_export_zone_shutdown()
1034 nfs_export_t *ne = ng->nfs_export; in nfs_export_zone_fini() local
1039 rw_enter(&ne->exported_lock, RW_WRITER); in nfs_export_zone_fini()
1042 avl_remove(&exi_id_tree, ne->exi_root); in nfs_export_zone_fini()
1045 export_unlink(ne, ne->exi_root); in nfs_export_zone_fini()
1047 rw_exit(&ne->exported_lock); in nfs_export_zone_fini()
1050 srv_secinfo_list_free(ne->exi_root->exi_export.ex_secinfo, in nfs_export_zone_fini()
1051 ne->exi_root->exi_export.ex_seccnt); in nfs_export_zone_fini()
1052 mutex_destroy(&ne->exi_root->exi_lock); in nfs_export_zone_fini()
1054 rw_destroy(&ne->exi_root->exi_cache_lock); in nfs_export_zone_fini()
1056 avl_destroy(ne->exi_root->exi_cache[i]); in nfs_export_zone_fini()
1057 kmem_free(ne->exi_root->exi_cache[i], sizeof (avl_tree_t)); in nfs_export_zone_fini()
1060 kmem_free(ne->exi_root->exi_export.ex_path, in nfs_export_zone_fini()
1061 ne->exi_root->exi_export.ex_pathlen + 1); in nfs_export_zone_fini()
1062 kmem_free(ne->exi_root, sizeof (*ne->exi_root)); in nfs_export_zone_fini()
1082 rw_destroy(&ne->exported_lock); in nfs_export_zone_fini()
1083 kmem_free(ne, sizeof (*ne)); in nfs_export_zone_fini()
1150 nfs_export_t *ne = nfs_get_export(); in rfs_gsscallback() local
1161 rw_enter(&ne->exported_lock, RW_READER); in rfs_gsscallback()
1164 exi = ne->exptable[i]; in rfs_gsscallback()
1204 rw_exit(&ne->exported_lock); in rfs_gsscallback()
1271 nfs_export_t *ne = nfs_get_export(); in exportfs() local
1281 rw_enter(&ne->exported_lock, RW_READER); in exportfs()
1283 for (ex1 = ne->exptable_path_hash[pkp_tab_hash(lookpn.pn_path, in exportfs()
1285 if (ex1 != ne->exi_root && 0 == in exportfs()
1292 rw_exit(&ne->exported_lock); in exportfs()
1299 error = unexport(ne, ex1, cr); in exportfs()
1396 rw_enter(&ne->exported_lock, RW_READER); in exportfs()
1398 for (ex2 = ne->exptable[exptablehash(&fsid, &fid)]; ex2; in exportfs()
1400 if (ex2 != ne->exi_root && !PSEUDO(ex2) && in exportfs()
1404 rw_exit(&ne->exported_lock); in exportfs()
1413 rw_exit(&ne->exported_lock); in exportfs()
1698 rw_enter(&ne->exported_lock, RW_WRITER); in exportfs()
1701 export_link(ne, exi); in exportfs()
1709 if (ex != ne->exi_root && VN_CMP(ex->exi_vp, vp)) { in exportfs()
1713 export_unlink(ne, ex); in exportfs()
1722 if (ex != NULL && ex == ne->exi_public) in exportfs()
1723 ne->exi_public = ne->exi_root; in exportfs()
1731 ne->exi_public = exi; in exportfs()
1763 tree_update_change(ne, exi->exi_tree, NULL); in exportfs()
1773 srv_secinfo_treeclimb(ne, exi, newsec, newcnt, TRUE); in exportfs()
1798 srv_secinfo_treeclimb(ne, ex, oldsec, oldcnt, FALSE); in exportfs()
1826 rw_exit(&ne->exported_lock); in exportfs()
1828 if (ne->exi_public == exi || kex->ex_flags & EX_LOG) { in exportfs()
1842 export_unlink(ne, exi); in exportfs()
1844 rw_exit(&ne->exported_lock); in exportfs()
1888 export_unlink(nfs_export_t *ne, struct exportinfo *exi) in export_unlink() argument
1890 ASSERT(RW_WRITE_HELD(&ne->exported_lock)); in export_unlink()
1894 ASSERT3P(exi->exi_ne, ==, ne); in export_unlink()
1902 unexport(nfs_export_t *ne, struct exportinfo *exi, cred_t *cr) in unexport() argument
1907 rw_enter(&ne->exported_lock, RW_WRITER); in unexport()
1911 rw_exit(&ne->exported_lock); in unexport()
1918 export_unlink(ne, exi); in unexport()
1925 srv_secinfo_treeclimb(ne, exi, cursec, curcnt, FALSE); in unexport()
1935 newexi = pseudo_exportfs(ne, exi->exi_vp, &exi->exi_fid, in unexport()
1944 tree_update_change(ne, exi->exi_tree, NULL); in unexport()
1946 treeclimb_unexport(ne, exi); in unexport()
1949 rw_exit(&ne->exported_lock); in unexport()
1957 rfs4_clean_state_exi(ne, exi); in unexport()
1970 if (exi == ne->exi_public) { in unexport()
1971 ne->exi_public = ne->exi_root; in unexport()
1973 nfslog_share_record(ne->exi_public, cr); in unexport()
2706 nfs_export_t *ne = nfs_get_export(); in checkexport() local
2708 rw_enter(&ne->exported_lock, RW_READER); in checkexport()
2709 for (exi = ne->exptable[exptablehash(fsid, fid)]; in checkexport()
2720 exi = ne->exi_public; in checkexport()
2724 rw_exit(&ne->exported_lock); in checkexport()
2728 rw_exit(&ne->exported_lock); in checkexport()
2744 nfs_export_t *ne = nfs_get_export(); in checkexport4() local
2746 ASSERT(RW_LOCK_HELD(&ne->exported_lock)); in checkexport4()
2748 for (exi = ne->exptable[exptablehash(fsid, fid)]; in checkexport4()
2759 exi = ne->exi_public; in checkexport4()