vfs_export.c (55431) | vfs_export.c (55539) |
---|---|
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 55431 2000-01-05 05:11:37Z dillon $ | 39 * $FreeBSD: head/sys/kern/vfs_export.c 55539 2000-01-07 08:36:44Z luoqi $ |
40 */ 41 42/* 43 * External virtual filesystem routines 44 */ 45#include "opt_ddb.h" 46 47#include <sys/param.h> 48#include <sys/systm.h> | 40 */ 41 42/* 43 * External virtual filesystem routines 44 */ 45#include "opt_ddb.h" 46 47#include <sys/param.h> 48#include <sys/systm.h> |
49#include <sys/buf.h> 50#include <sys/conf.h> 51#include <sys/dirent.h> 52#include <sys/domain.h> 53#include <sys/eventhandler.h> |
|
49#include <sys/fcntl.h> 50#include <sys/kernel.h> | 54#include <sys/fcntl.h> 55#include <sys/kernel.h> |
51#include <sys/proc.h> | |
52#include <sys/kthread.h> 53#include <sys/malloc.h> 54#include <sys/mount.h> | 56#include <sys/kthread.h> 57#include <sys/malloc.h> 58#include <sys/mount.h> |
59#include <sys/proc.h> 60#include <sys/reboot.h> |
|
55#include <sys/socket.h> | 61#include <sys/socket.h> |
56#include <sys/vnode.h> | |
57#include <sys/stat.h> | 62#include <sys/stat.h> |
58#include <sys/buf.h> 59#include <sys/domain.h> 60#include <sys/dirent.h> | 63#include <sys/sysctl.h> |
61#include <sys/vmmeter.h> | 64#include <sys/vmmeter.h> |
62#include <sys/conf.h> | 65#include <sys/vnode.h> |
63 64#include <machine/limits.h> 65 66#include <vm/vm.h> 67#include <vm/vm_object.h> 68#include <vm/vm_extern.h> 69#include <vm/pmap.h> 70#include <vm/vm_map.h> 71#include <vm/vm_page.h> 72#include <vm/vm_pager.h> 73#include <vm/vnode_pager.h> 74#include <vm/vm_zone.h> | 66 67#include <machine/limits.h> 68 69#include <vm/vm.h> 70#include <vm/vm_object.h> 71#include <vm/vm_extern.h> 72#include <vm/pmap.h> 73#include <vm/vm_map.h> 74#include <vm/vm_page.h> 75#include <vm/vm_pager.h> 76#include <vm/vnode_pager.h> 77#include <vm/vm_zone.h> |
75#include <sys/sysctl.h> | |
76 77static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure"); 78 79static void insmntque __P((struct vnode *vp, struct mount *mp)); 80static void vclean __P((struct vnode *vp, int flags, struct proc *p)); 81static void vfree __P((struct vnode *)); 82static void vgonel __P((struct vnode *vp, struct proc *p)); 83static unsigned long numvnodes; --- 886 unchanged lines hidden (view full) --- 970sched_sync(void) 971{ 972 struct synclist *slp; 973 struct vnode *vp; 974 long starttime; 975 int s; 976 struct proc *p = updateproc; 977 | 78 79static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure"); 80 81static void insmntque __P((struct vnode *vp, struct mount *mp)); 82static void vclean __P((struct vnode *vp, int flags, struct proc *p)); 83static void vfree __P((struct vnode *)); 84static void vgonel __P((struct vnode *vp, struct proc *p)); 85static unsigned long numvnodes; --- 886 unchanged lines hidden (view full) --- 972sched_sync(void) 973{ 974 struct synclist *slp; 975 struct vnode *vp; 976 long starttime; 977 int s; 978 struct proc *p = updateproc; 979 |
980 EVENTHANDLER_REGISTER(shutdown_pre_sync, shutdown_kproc, p, 981 SHUTDOWN_PRI_LAST); 982 |
|
978 p->p_flag |= P_BUFEXHAUST; 979 980 for (;;) { | 983 p->p_flag |= P_BUFEXHAUST; 984 985 for (;;) { |
986 kproc_suspend_loop(p); 987 |
|
981 starttime = time_second; 982 983 /* 984 * Push files whose dirty time has expired. Be careful 985 * of interrupt race on slp queue. 986 */ 987 s = splbio(); 988 slp = &syncer_workitem_pending[syncer_delayno]; --- 1895 unchanged lines hidden --- | 988 starttime = time_second; 989 990 /* 991 * Push files whose dirty time has expired. Be careful 992 * of interrupt race on slp queue. 993 */ 994 s = splbio(); 995 slp = &syncer_workitem_pending[syncer_delayno]; --- 1895 unchanged lines hidden --- |