Deleted Added
full compact
bio.h (41124) bio.h (42957)
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.9 (Berkeley) 3/30/95
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.9 (Berkeley) 3/30/95
39 * $Id: buf.h,v 1.60 1998/10/31 14:05:11 peter Exp $
39 * $Id: buf.h,v 1.61 1998/11/13 01:01:44 dg Exp $
40 */
41
42#ifndef _SYS_BUF_H_
43#define _SYS_BUF_H_
44
45#include <sys/queue.h>
46
47struct buf;

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

111 struct ucred *b_wcred; /* Write credentials reference. */
112 int b_validoff; /* Offset in buffer of valid region. */
113 int b_validend; /* Offset of end of valid region. */
114 daddr_t b_pblkno; /* physical block number */
115 void *b_saveaddr; /* Original b_addr for physio. */
116 caddr_t b_savekva; /* saved kva for transfer while bouncing */
117 void *b_driver1; /* for private use by the driver */
118 void *b_driver2; /* for private use by the driver */
40 */
41
42#ifndef _SYS_BUF_H_
43#define _SYS_BUF_H_
44
45#include <sys/queue.h>
46
47struct buf;

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

111 struct ucred *b_wcred; /* Write credentials reference. */
112 int b_validoff; /* Offset in buffer of valid region. */
113 int b_validend; /* Offset of end of valid region. */
114 daddr_t b_pblkno; /* physical block number */
115 void *b_saveaddr; /* Original b_addr for physio. */
116 caddr_t b_savekva; /* saved kva for transfer while bouncing */
117 void *b_driver1; /* for private use by the driver */
118 void *b_driver2; /* for private use by the driver */
119 void *b_spc;
119 union pager_info {
120 void *pg_spc;
121 int pg_reqpage;
122 } b_pager;
120 union cluster_info {
121 TAILQ_HEAD(cluster_list_head, buf) cluster_head;
122 TAILQ_ENTRY(buf) cluster_entry;
123 } b_cluster;
124 struct vm_page *b_pages[btoc(MAXPHYS)];
125 int b_npages;
126 struct workhead b_dep; /* List of filesystem dependencies. */
127};
128
123 union cluster_info {
124 TAILQ_HEAD(cluster_list_head, buf) cluster_head;
125 TAILQ_ENTRY(buf) cluster_entry;
126 } b_cluster;
127 struct vm_page *b_pages[btoc(MAXPHYS)];
128 int b_npages;
129 struct workhead b_dep; /* List of filesystem dependencies. */
130};
131
132#define b_spc b_pager.pg_spc
133
129/*
130 * These flags are kept in b_flags.
134/*
135 * These flags are kept in b_flags.
136 *
137 * Notes:
138 *
139 * B_ASYNC VOP calls on bp's are usually async whether or not
140 * B_ASYNC is set, but some subsystems, such as NFS, like
141 * to know what is best for the caller so they can
142 * optimize the I/O.
143 *
144 * B_PAGING Indicates that bp is being used by the paging system or
145 * some paging system and that the bp is not linked into
146 * the b_vp's clean/dirty linked lists or ref counts.
147 * Buffer vp reassignments are illegal in this case.
148 *
149 * B_CACHE This may only be set if the buffer is entirely valid.
150 * The situation where B_DELWRI is set and B_CACHE gets
151 * cleared MUST be committed to disk so B_DELWRI can
152 * also be cleared.
131 */
153 */
154
132#define B_AGE 0x00000001 /* Move to age queue when I/O done. */
133#define B_NEEDCOMMIT 0x00000002 /* Append-write in progress. */
134#define B_ASYNC 0x00000004 /* Start I/O, do not wait. */
135#define B_BAD 0x00000008 /* Bad block revectoring in progress. */
136#define B_BUSY 0x00000010 /* I/O in progress. */
137#define B_CACHE 0x00000020 /* Bread found us in the cache. */
138#define B_CALL 0x00000040 /* Call b_iodone from biodone. */
139#define B_DELWRI 0x00000080 /* Delay I/O until buffer reused. */

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

307int bwrite __P((struct buf *));
308void bdwrite __P((struct buf *));
309void bawrite __P((struct buf *));
310void bdirty __P((struct buf *));
311int bowrite __P((struct buf *));
312void brelse __P((struct buf *));
313void bqrelse __P((struct buf *));
314int vfs_bio_awrite __P((struct buf *));
155#define B_AGE 0x00000001 /* Move to age queue when I/O done. */
156#define B_NEEDCOMMIT 0x00000002 /* Append-write in progress. */
157#define B_ASYNC 0x00000004 /* Start I/O, do not wait. */
158#define B_BAD 0x00000008 /* Bad block revectoring in progress. */
159#define B_BUSY 0x00000010 /* I/O in progress. */
160#define B_CACHE 0x00000020 /* Bread found us in the cache. */
161#define B_CALL 0x00000040 /* Call b_iodone from biodone. */
162#define B_DELWRI 0x00000080 /* Delay I/O until buffer reused. */

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

330int bwrite __P((struct buf *));
331void bdwrite __P((struct buf *));
332void bawrite __P((struct buf *));
333void bdirty __P((struct buf *));
334int bowrite __P((struct buf *));
335void brelse __P((struct buf *));
336void bqrelse __P((struct buf *));
337int vfs_bio_awrite __P((struct buf *));
315struct buf * getpbuf __P((void));
338struct buf * getpbuf __P((int *));
316struct buf *incore __P((struct vnode *, daddr_t));
317struct buf *gbincore __P((struct vnode *, daddr_t));
318int inmem __P((struct vnode *, daddr_t));
319struct buf *getblk __P((struct vnode *, daddr_t, int, int, int));
320struct buf *geteblk __P((int));
339struct buf *incore __P((struct vnode *, daddr_t));
340struct buf *gbincore __P((struct vnode *, daddr_t));
341int inmem __P((struct vnode *, daddr_t));
342struct buf *getblk __P((struct vnode *, daddr_t, int, int, int));
343struct buf *geteblk __P((int));
321int allocbuf __P((struct buf *, int));
322int biowait __P((struct buf *));
323void biodone __P((struct buf *));
324
325void cluster_callback __P((struct buf *));
326int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long,
327 struct ucred *, long, int, struct buf **));
328int cluster_wbuild __P((struct vnode *, long, daddr_t, int));
329void cluster_write __P((struct buf *, u_quad_t));
330int physio __P((void (*)(struct buf *), struct buf *, dev_t,
331 int, u_int (*)(struct buf *), struct uio *));
332u_int minphys __P((struct buf *));
333void vfs_bio_clrbuf __P((struct buf *));
334void vfs_busy_pages __P((struct buf *, int clear_modify));
335void vfs_unbusy_pages __P((struct buf *));
336void vwakeup __P((struct buf *));
337void vmapbuf __P((struct buf *));
338void vunmapbuf __P((struct buf *));
344int biowait __P((struct buf *));
345void biodone __P((struct buf *));
346
347void cluster_callback __P((struct buf *));
348int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long,
349 struct ucred *, long, int, struct buf **));
350int cluster_wbuild __P((struct vnode *, long, daddr_t, int));
351void cluster_write __P((struct buf *, u_quad_t));
352int physio __P((void (*)(struct buf *), struct buf *, dev_t,
353 int, u_int (*)(struct buf *), struct uio *));
354u_int minphys __P((struct buf *));
355void vfs_bio_clrbuf __P((struct buf *));
356void vfs_busy_pages __P((struct buf *, int clear_modify));
357void vfs_unbusy_pages __P((struct buf *));
358void vwakeup __P((struct buf *));
359void vmapbuf __P((struct buf *));
360void vunmapbuf __P((struct buf *));
339void relpbuf __P((struct buf *));
361void relpbuf __P((struct buf *, int *));
340void brelvp __P((struct buf *));
341void bgetvp __P((struct vnode *, struct buf *));
342void pbgetvp __P((struct vnode *, struct buf *));
343void pbrelvp __P((struct buf *));
362void brelvp __P((struct buf *));
363void bgetvp __P((struct vnode *, struct buf *));
364void pbgetvp __P((struct vnode *, struct buf *));
365void pbrelvp __P((struct buf *));
366int allocbuf __P((struct buf *bp, int size));
344void reassignbuf __P((struct buf *, struct vnode *));
367void reassignbuf __P((struct buf *, struct vnode *));
345struct buf *trypbuf __P((void));
368void bpreassignbuf __P((struct buf *, struct vnode *));
369struct buf *trypbuf __P((int *));
346void vfs_bio_need_satisfy __P((void));
347#endif /* KERNEL */
348
349#endif /* !_SYS_BUF_H_ */
370void vfs_bio_need_satisfy __P((void));
371#endif /* KERNEL */
372
373#endif /* !_SYS_BUF_H_ */