Deleted Added
full compact
bio.h (10226) bio.h (12404)
1/*
2 * Copyright (c) 1982, 1986, 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 * @(#)buf.h 8.7 (Berkeley) 1/21/94
1/*
2 * Copyright (c) 1982, 1986, 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 * @(#)buf.h 8.7 (Berkeley) 1/21/94
39 * $Id: buf.h,v 1.20 1995/07/29 11:42:43 bde Exp $
39 * $Id: buf.h,v 1.21 1995/08/24 12:57:17 davidg Exp $
40 */
41
42#ifndef _SYS_BUF_H_
43#define _SYS_BUF_H_
44#include <sys/queue.h>
45
46#define NOLIST ((struct buf *)0x87654321)
47

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

79 void *b_saveaddr; /* Original b_addr for physio. */
80 daddr_t b_lblkno; /* Logical block number. */
81 daddr_t b_blkno; /* Underlying physical block number. */
82 /* Function to call upon completion. */
83 void (*b_iodone) __P((struct buf *));
84 /* For nested b_iodone's. */
85 struct iodone_chain *b_iodone_chain;
86 struct vnode *b_vp; /* Device vnode. */
40 */
41
42#ifndef _SYS_BUF_H_
43#define _SYS_BUF_H_
44#include <sys/queue.h>
45
46#define NOLIST ((struct buf *)0x87654321)
47

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

79 void *b_saveaddr; /* Original b_addr for physio. */
80 daddr_t b_lblkno; /* Logical block number. */
81 daddr_t b_blkno; /* Underlying physical block number. */
82 /* Function to call upon completion. */
83 void (*b_iodone) __P((struct buf *));
84 /* For nested b_iodone's. */
85 struct iodone_chain *b_iodone_chain;
86 struct vnode *b_vp; /* Device vnode. */
87 int b_pfcent; /* Center page when swapping cluster. */
88 int b_dirtyoff; /* Offset in buffer of dirty region. */
89 int b_dirtyend; /* Offset of end of dirty region. */
90 struct ucred *b_rcred; /* Read credentials reference. */
91 struct ucred *b_wcred; /* Write credentials reference. */
92 int b_validoff; /* Offset in buffer of valid region. */
93 int b_validend; /* Offset of end of valid region. */
94 daddr_t b_pblkno; /* physical block number */
95 caddr_t b_savekva; /* saved kva for transfer while bouncing */
96 void *b_driver1; /* for private use by the driver */
97 void *b_driver2; /* for private use by the driver */
98 void *b_spc;
87 int b_dirtyoff; /* Offset in buffer of dirty region. */
88 int b_dirtyend; /* Offset of end of dirty region. */
89 struct ucred *b_rcred; /* Read credentials reference. */
90 struct ucred *b_wcred; /* Write credentials reference. */
91 int b_validoff; /* Offset in buffer of valid region. */
92 int b_validend; /* Offset of end of valid region. */
93 daddr_t b_pblkno; /* physical block number */
94 caddr_t b_savekva; /* saved kva for transfer while bouncing */
95 void *b_driver1; /* for private use by the driver */
96 void *b_driver2; /* for private use by the driver */
97 void *b_spc;
98 union cluster_info {
99 TAILQ_HEAD(cluster_list_head, buf) cluster_head;
100 TAILQ_ENTRY(buf) cluster_entry;
101 } b_cluster;
99 struct vm_page *b_pages[(MAXPHYS + PAGE_SIZE - 1)/PAGE_SIZE];
100 int b_npages;
101};
102
103/* Device driver compatibility definitions. */
104#define b_active b_bcount /* Driver queue head: drive active. */
105#define b_data b_un.b_addr /* b_un.b_addr is not changeable. */
106#define b_errcnt b_resid /* Retry count while I/O in progress. */

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

138#define B_WRITEINPROG 0x01000000 /* Write in progress. */
139#define B_XXX 0x02000000 /* Debugging flag. */
140#define B_PAGING 0x04000000 /* volatile paging I/O -- bypass VMIO */
141#define B_VMIO 0x20000000 /* VMIO flag */
142#define B_CLUSTER 0x40000000 /* pagein op, so swap() can count it */
143#define B_BOUNCE 0x80000000 /* bounce buffer flag */
144
145/*
102 struct vm_page *b_pages[(MAXPHYS + PAGE_SIZE - 1)/PAGE_SIZE];
103 int b_npages;
104};
105
106/* Device driver compatibility definitions. */
107#define b_active b_bcount /* Driver queue head: drive active. */
108#define b_data b_un.b_addr /* b_un.b_addr is not changeable. */
109#define b_errcnt b_resid /* Retry count while I/O in progress. */

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

141#define B_WRITEINPROG 0x01000000 /* Write in progress. */
142#define B_XXX 0x02000000 /* Debugging flag. */
143#define B_PAGING 0x04000000 /* volatile paging I/O -- bypass VMIO */
144#define B_VMIO 0x20000000 /* VMIO flag */
145#define B_CLUSTER 0x40000000 /* pagein op, so swap() can count it */
146#define B_BOUNCE 0x80000000 /* bounce buffer flag */
147
148/*
146 * This structure describes a clustered I/O. It is stored in the b_saveaddr
147 * field of the buffer on which I/O is done. At I/O completion, cluster
148 * callback uses the structure to parcel I/O's to individual buffers, and
149 * then free's this structure.
150 */
151struct cluster_save {
152 long bs_bcount; /* Saved b_bcount. */
153 long bs_bufsize; /* Saved b_bufsize. */
154 void *bs_saveaddr; /* Saved b_addr. */
155 int bs_nchildren; /* Number of associated buffers. */
156 struct buf **bs_children; /* List of associated buffers. */
157};
158
159/*
160 * number of buffer hash entries
161 */
162#define BUFHSZ 512
163
164/*
165 * buffer hash table calculation, originally by David Greenman
166 */
167#define BUFHASH(vnp, bn) \

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

222struct buf *geteblk __P((int));
223int allocbuf __P((struct buf *, int));
224int biowait __P((struct buf *));
225void biodone __P((struct buf *));
226
227void cluster_callback __P((struct buf *));
228int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long,
229 struct ucred *, struct buf **));
149 * number of buffer hash entries
150 */
151#define BUFHSZ 512
152
153/*
154 * buffer hash table calculation, originally by David Greenman
155 */
156#define BUFHASH(vnp, bn) \

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

211struct buf *geteblk __P((int));
212int allocbuf __P((struct buf *, int));
213int biowait __P((struct buf *));
214void biodone __P((struct buf *));
215
216void cluster_callback __P((struct buf *));
217int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long,
218 struct ucred *, struct buf **));
230void cluster_wbuild __P((struct vnode *, struct buf *, long, daddr_t, int,
231 daddr_t));
219void cluster_wbuild __P((struct vnode *, long, daddr_t, int));
232void cluster_write __P((struct buf *, u_quad_t));
233int physio __P((void (*)(), struct buf *, dev_t, int, u_int (*)(),
234 struct uio *));
235u_int minphys __P((struct buf *));
236void vfs_bio_clrbuf __P((struct buf *));
237void vfs_busy_pages __P((struct buf *, int clear_modify));
238void vfs_unbusy_pages(struct buf *);
239void vwakeup __P((struct buf *));

--- 16 unchanged lines hidden ---
220void cluster_write __P((struct buf *, u_quad_t));
221int physio __P((void (*)(), struct buf *, dev_t, int, u_int (*)(),
222 struct uio *));
223u_int minphys __P((struct buf *));
224void vfs_bio_clrbuf __P((struct buf *));
225void vfs_busy_pages __P((struct buf *, int clear_modify));
226void vfs_unbusy_pages(struct buf *);
227void vwakeup __P((struct buf *));

--- 16 unchanged lines hidden ---