3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright (c) 1986, 2010, Oracle and/or its affiliates. All rights reserved.
23 */
24
25 /*
26 * Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
27 * All rights reserved.
28 */
29
30 #include <sys/param.h>
31 #include <sys/types.h>
32 #include <sys/systm.h>
33 #include <sys/cred.h>
34 #include <sys/vfs.h>
35 #include <sys/vfs_opreg.h>
36 #include <sys/vnode.h>
37 #include <sys/pathname.h>
38 #include <sys/sysmacros.h>
39 #include <sys/kmem.h>
40 #include <sys/mkdev.h>
41 #include <sys/mount.h>
42 #include <sys/mntent.h>
983 if (mi->mi_ro_kstats) {
984 kstat_delete(mi->mi_ro_kstats);
985 mi->mi_ro_kstats = NULL;
986 }
987 nfs_free_mi(mi);
988 }
989 }
990
991
992 if (!(uap->flags & MS_SYSSPACE)) {
993 nfs3_free_args(args, fhandle);
994 kmem_free(args, sizeof (*args));
995 }
996
997 if (mntzone != NULL)
998 zone_rele(mntzone);
999
1000 return (error);
1001 }
1002
1003 static int nfs3_dynamic = 0; /* global variable to enable dynamic retrans. */
1004 static ushort_t nfs3_max_threads = 8; /* max number of active async threads */
1005 uint_t nfs3_bsize = 32 * 1024; /* client `block' size */
1006 static uint_t nfs3_async_clusters = 1; /* # of reqs from each async queue */
1007 static uint_t nfs3_cots_timeo = NFS_COTS_TIMEO;
1008
1009 static int
1010 nfs3rootvp(vnode_t **rtvpp, vfs_t *vfsp, struct servinfo *svp,
1011 int flags, cred_t *cr, zone_t *zone)
1012 {
1013 vnode_t *rtvp;
1014 mntinfo_t *mi;
1015 dev_t nfs_dev;
1016 struct vattr va;
1017 struct FSINFO3args args;
1018 struct FSINFO3res res;
1019 int error;
1020 int douprintf;
1021 rnode_t *rp;
1022 int i;
1023 uint_t max_transfer_size;
1024 struct nfs_stats *nfsstatsp;
1025 cred_t *lcr = NULL, *tcr = cr;
1026
1027 nfsstatsp = zone_getspecific(nfsstat_zone_key, nfs_zone());
|
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright (c) 1986, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
24 */
25
26 /*
27 * Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
28 * All rights reserved.
29 */
30
31 #include <sys/param.h>
32 #include <sys/types.h>
33 #include <sys/systm.h>
34 #include <sys/cred.h>
35 #include <sys/vfs.h>
36 #include <sys/vfs_opreg.h>
37 #include <sys/vnode.h>
38 #include <sys/pathname.h>
39 #include <sys/sysmacros.h>
40 #include <sys/kmem.h>
41 #include <sys/mkdev.h>
42 #include <sys/mount.h>
43 #include <sys/mntent.h>
984 if (mi->mi_ro_kstats) {
985 kstat_delete(mi->mi_ro_kstats);
986 mi->mi_ro_kstats = NULL;
987 }
988 nfs_free_mi(mi);
989 }
990 }
991
992
993 if (!(uap->flags & MS_SYSSPACE)) {
994 nfs3_free_args(args, fhandle);
995 kmem_free(args, sizeof (*args));
996 }
997
998 if (mntzone != NULL)
999 zone_rele(mntzone);
1000
1001 return (error);
1002 }
1003
1004 volatile int nfs3_dynamic = 0; /* global variable to enable dynamic retrans. */
1005 volatile ushort_t nfs3_max_threads = 8; /* max number of active async threads */
1006 volatile uint_t nfs3_bsize = 32 * 1024; /* client `block' size */
1007 volatile uint_t nfs3_async_clusters = 1; /* # of reqs from each async queue */
1008 volatile uint_t nfs3_cots_timeo = NFS_COTS_TIMEO;
1009
1010 static int
1011 nfs3rootvp(vnode_t **rtvpp, vfs_t *vfsp, struct servinfo *svp,
1012 int flags, cred_t *cr, zone_t *zone)
1013 {
1014 vnode_t *rtvp;
1015 mntinfo_t *mi;
1016 dev_t nfs_dev;
1017 struct vattr va;
1018 struct FSINFO3args args;
1019 struct FSINFO3res res;
1020 int error;
1021 int douprintf;
1022 rnode_t *rp;
1023 int i;
1024 uint_t max_transfer_size;
1025 struct nfs_stats *nfsstatsp;
1026 cred_t *lcr = NULL, *tcr = cr;
1027
1028 nfsstatsp = zone_getspecific(nfsstat_zone_key, nfs_zone());
|