vfs_export.c (69529) | vfs_export.c (69664) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 |
39 * $FreeBSD: head/sys/kern/vfs_export.c 69529 2000-12-02 20:08:33Z gallatin $ | 39 * $FreeBSD: head/sys/kern/vfs_export.c 69664 2000-12-06 07:09:08Z peter $ |
40 */ 41 42/* 43 * External virtual filesystem routines 44 */ 45#include "opt_ddb.h" 46#include "opt_ffs.h" 47 --- 191 unchanged lines hidden (view full) --- 239static void vfs_free_addrlist __P((struct netexport *nep)); 240static int vfs_free_netcred __P((struct radix_node *rn, void *w)); 241static int vfs_hang_addrlist __P((struct mount *mp, struct netexport *nep, 242 struct export_args *argp)); 243 244/* 245 * Initialize the vnode management data structures. 246 */ | 40 */ 41 42/* 43 * External virtual filesystem routines 44 */ 45#include "opt_ddb.h" 46#include "opt_ffs.h" 47 --- 191 unchanged lines hidden (view full) --- 239static void vfs_free_addrlist __P((struct netexport *nep)); 240static int vfs_free_netcred __P((struct radix_node *rn, void *w)); 241static int vfs_hang_addrlist __P((struct mount *mp, struct netexport *nep, 242 struct export_args *argp)); 243 244/* 245 * Initialize the vnode management data structures. 246 */ |
247void 248vntblinit() | 247static void 248vntblinit(void *dummy __unused) |
249{ 250 251 desiredvnodes = maxproc + cnt.v_page_count / 4; 252 mtx_init(&mountlist_mtx, "mountlist", MTX_DEF); 253 simple_lock_init(&mntvnode_slock); 254 simple_lock_init(&mntid_slock); 255 simple_lock_init(&spechash_slock); 256 TAILQ_INIT(&vnode_free_list); 257 simple_lock_init(&vnode_free_list_slock); 258 vnode_zone = zinit("VNODE", sizeof (struct vnode), 0, 0, 5); 259 /* 260 * Initialize the filesystem syncer. 261 */ 262 syncer_workitem_pending = hashinit(syncer_maxdelay, M_VNODE, 263 &syncer_mask); 264 syncer_maxdelay = syncer_mask + 1; 265} | 249{ 250 251 desiredvnodes = maxproc + cnt.v_page_count / 4; 252 mtx_init(&mountlist_mtx, "mountlist", MTX_DEF); 253 simple_lock_init(&mntvnode_slock); 254 simple_lock_init(&mntid_slock); 255 simple_lock_init(&spechash_slock); 256 TAILQ_INIT(&vnode_free_list); 257 simple_lock_init(&vnode_free_list_slock); 258 vnode_zone = zinit("VNODE", sizeof (struct vnode), 0, 0, 5); 259 /* 260 * Initialize the filesystem syncer. 261 */ 262 syncer_workitem_pending = hashinit(syncer_maxdelay, M_VNODE, 263 &syncer_mask); 264 syncer_maxdelay = syncer_mask + 1; 265} |
266SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, vntblinit, NULL) |
|
266 | 267 |
268 |
|
267/* 268 * Mark a mount point as busy. Used to synchronize access and to delay 269 * unmounting. Interlock is not released on failure. 270 */ 271int 272vfs_busy(mp, flags, interlkp, p) 273 struct mount *mp; 274 int flags; --- 2859 unchanged lines hidden --- | 269/* 270 * Mark a mount point as busy. Used to synchronize access and to delay 271 * unmounting. Interlock is not released on failure. 272 */ 273int 274vfs_busy(mp, flags, interlkp, p) 275 struct mount *mp; 276 int flags; --- 2859 unchanged lines hidden --- |