bio.h (12428) | bio.h (12767) |
---|---|
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.23 1995/11/19 22:22:03 dyson Exp $ | 39 * $Id: buf.h,v 1.24 1995/11/20 12:35:16 phk 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 --- 16 unchanged lines hidden (view full) --- 64 */ 65struct buf { 66 LIST_ENTRY(buf) b_hash; /* Hash chain. */ 67 LIST_ENTRY(buf) b_vnbufs; /* Buffer's associated vnode. */ 68 TAILQ_ENTRY(buf) b_freelist; /* Free list position if not active. */ 69 struct buf *b_actf, **b_actb; /* Device driver queue when active. *depricated* XXX */ 70 TAILQ_ENTRY(buf) b_act; /* Device driver queue when active. *new* */ 71 struct proc *b_proc; /* Associated proc; NULL if kernel. */ | 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 --- 16 unchanged lines hidden (view full) --- 64 */ 65struct buf { 66 LIST_ENTRY(buf) b_hash; /* Hash chain. */ 67 LIST_ENTRY(buf) b_vnbufs; /* Buffer's associated vnode. */ 68 TAILQ_ENTRY(buf) b_freelist; /* Free list position if not active. */ 69 struct buf *b_actf, **b_actb; /* Device driver queue when active. *depricated* XXX */ 70 TAILQ_ENTRY(buf) b_act; /* Device driver queue when active. *new* */ 71 struct proc *b_proc; /* Associated proc; NULL if kernel. */ |
72 volatile long b_flags; /* B_* flags. */ 73 int b_qindex; /* buffer queue index */ | 72 long b_flags; /* B_* flags. */ 73 unsigned short b_qindex; /* buffer queue index */ 74 unsigned char b_usecount; /* buffer use count */ |
74 int b_error; /* Errno value. */ 75 long b_bufsize; /* Allocated buffer size. */ 76 long b_bcount; /* Valid bytes in buffer. */ 77 long b_resid; /* Remaining I/O. */ 78 dev_t b_dev; /* Device associated with buffer. */ 79 struct { 80 caddr_t b_addr; /* Memory, superblocks, indirect etc. */ 81 } b_un; --- 119 unchanged lines hidden (view full) --- 201int bread __P((struct vnode *, daddr_t, int, 202 struct ucred *, struct buf **)); 203int breadn __P((struct vnode *, daddr_t, int, daddr_t *, int *, int, 204 struct ucred *, struct buf **)); 205int bwrite __P((struct buf *)); 206void bdwrite __P((struct buf *)); 207void bawrite __P((struct buf *)); 208void brelse __P((struct buf *)); | 75 int b_error; /* Errno value. */ 76 long b_bufsize; /* Allocated buffer size. */ 77 long b_bcount; /* Valid bytes in buffer. */ 78 long b_resid; /* Remaining I/O. */ 79 dev_t b_dev; /* Device associated with buffer. */ 80 struct { 81 caddr_t b_addr; /* Memory, superblocks, indirect etc. */ 82 } b_un; --- 119 unchanged lines hidden (view full) --- 202int bread __P((struct vnode *, daddr_t, int, 203 struct ucred *, struct buf **)); 204int breadn __P((struct vnode *, daddr_t, int, daddr_t *, int *, int, 205 struct ucred *, struct buf **)); 206int bwrite __P((struct buf *)); 207void bdwrite __P((struct buf *)); 208void bawrite __P((struct buf *)); 209void brelse __P((struct buf *)); |
209void vfs_bio_awrite __P((struct buf *)); | 210int vfs_bio_awrite __P((struct buf *)); |
210struct buf * getpbuf __P((void)); 211struct buf *incore __P((struct vnode *, daddr_t)); | 211struct buf * getpbuf __P((void)); 212struct buf *incore __P((struct vnode *, daddr_t)); |
213struct buf *gbincore __P((struct vnode *, daddr_t)); |
|
212int inmem __P((struct vnode *, daddr_t)); 213struct buf *getblk __P((struct vnode *, daddr_t, int, int, int)); 214struct buf *geteblk __P((int)); 215int allocbuf __P((struct buf *, int)); 216int biowait __P((struct buf *)); 217void biodone __P((struct buf *)); 218 219void cluster_callback __P((struct buf *)); 220int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long, 221 struct ucred *, struct buf **)); | 214int inmem __P((struct vnode *, daddr_t)); 215struct buf *getblk __P((struct vnode *, daddr_t, int, int, int)); 216struct buf *geteblk __P((int)); 217int allocbuf __P((struct buf *, int)); 218int biowait __P((struct buf *)); 219void biodone __P((struct buf *)); 220 221void cluster_callback __P((struct buf *)); 222int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long, 223 struct ucred *, struct buf **)); |
222void cluster_wbuild __P((struct vnode *, long, daddr_t, int)); | 224int cluster_wbuild __P((struct vnode *, long, daddr_t, int)); |
223void cluster_write __P((struct buf *, u_quad_t)); 224int physio __P((void (*)(struct buf *), struct buf *, dev_t, 225 int, u_int (*)(struct buf *), struct uio *)); 226u_int minphys __P((struct buf *)); 227void vfs_bio_clrbuf __P((struct buf *)); 228void vfs_busy_pages __P((struct buf *, int clear_modify)); 229void vfs_unbusy_pages(struct buf *); 230void vwakeup __P((struct buf *)); --- 16 unchanged lines hidden --- | 225void cluster_write __P((struct buf *, u_quad_t)); 226int physio __P((void (*)(struct buf *), struct buf *, dev_t, 227 int, u_int (*)(struct buf *), struct uio *)); 228u_int minphys __P((struct buf *)); 229void vfs_bio_clrbuf __P((struct buf *)); 230void vfs_busy_pages __P((struct buf *, int clear_modify)); 231void vfs_unbusy_pages(struct buf *); 232void vwakeup __P((struct buf *)); --- 16 unchanged lines hidden --- |