Deleted Added
sdiff udiff text old ( 12799 ) new ( 12819 )
full compact
1/*
2 * Copyright (c) 1994 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 4 unchanged lines hidden (view full) ---

13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * John S. Dyson.
16 * 4. This work was done expressly for inclusion into FreeBSD. Other use
17 * is allowed if this notation is included.
18 * 5. Modifications may be freely made to this file if the above conditions
19 * are met.
20 *
21 * $Id: vfs_bio.c,v 1.76 1995/12/11 04:56:05 dyson Exp $
22 */
23
24/*
25 * this file contains a new buffer I/O scheme implementing a coherent
26 * VM object and buffer cache scheme. Pains have been taken to make
27 * sure that the performance degradation associated with schemes such
28 * as this is not realized.
29 *

--- 23 unchanged lines hidden (view full) ---

53#include <sys/mount.h>
54#include <sys/malloc.h>
55#include <sys/resourcevar.h>
56#include <sys/proc.h>
57
58#include <miscfs/specfs/specdev.h>
59
60static void vfs_update __P((void));
61struct proc *updateproc;
62static struct kproc_desc up_kp = {
63 "update",
64 vfs_update,
65 &updateproc
66};
67SYSINIT_KT(update, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start, &up_kp)
68
69struct buf *buf; /* buffer header pool */
70struct swqueue bswlist;
71
72int count_lock_queue __P((void));
73void vm_hold_free_pages(struct buf * bp, vm_offset_t from, vm_offset_t to);
74void vm_hold_load_pages(struct buf * bp, vm_offset_t from, vm_offset_t to);
75void vfs_clean_pages(struct buf * bp);
76static void vfs_setdirty(struct buf *bp);
77
78int needsbuffer;
79
80/*
81 * Internal update daemon, process 3
82 * The variable vfs_update_wakeup allows for internal syncs.
83 */

--- 8 unchanged lines hidden (view full) ---

92/*
93 * bogus page -- for I/O to/from partially complete buffers
94 * this is a temporary solution to the problem, but it is not
95 * really that bad. it would be better to split the buffer
96 * for input in the case of buffers partially already in memory,
97 * but the code is intricate enough already.
98 */
99vm_page_t bogus_page;
100vm_offset_t bogus_offset;
101
102int bufspace, maxbufspace;
103
104struct bufhashhdr bufhashtbl[BUFHSZ], invalhash;
105struct bqueues bufqueues[BUFFER_QUEUES];
106
107#define BUF_MAXUSE 8
108
109/*
110 * Initialize buffer headers and related structures.
111 */
112void
113bufinit()

--- 1529 unchanged lines hidden ---