summaryrefslogtreecommitdiffstats
path: root/sys/sys/bio.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-05-01 13:36:25 +0000
committerphk <phk@FreeBSD.org>2000-05-01 13:36:25 +0000
commit8f6a76b4dd073885aba26f3bee2a0bf76a3c21c8 (patch)
tree2c449be5174c7adc5d7066a40e57a9546c7b6105 /sys/sys/bio.h
parent1adeb7ffb16ca15e57e103f0b216470ee1d82d99 (diff)
downloadFreeBSD-src-8f6a76b4dd073885aba26f3bee2a0bf76a3c21c8.zip
FreeBSD-src-8f6a76b4dd073885aba26f3bee2a0bf76a3c21c8.tar.gz
Give struct bio it's own call back mechanism.
Diffstat (limited to 'sys/sys/bio.h')
-rw-r--r--sys/sys/bio.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/sys/bio.h b/sys/sys/bio.h
index f8073cc..15fe014 100644
--- a/sys/sys/bio.h
+++ b/sys/sys/bio.h
@@ -45,6 +45,7 @@
#include <sys/queue.h>
#include <sys/lock.h>
+struct bio;
struct buf;
struct mount;
struct vnode;
@@ -71,7 +72,7 @@ extern struct bio_ops {
struct iodone_chain {
long ic_prev_flags;
- void (*ic_prev_iodone) __P((struct buf *));
+ void (*ic_prev_iodone) __P((struct bio *));
void *ic_prev_iodone_chain;
struct {
long ia_long;
@@ -93,7 +94,7 @@ struct bio {
struct buf *_bio_buf; /* Parent buffer. */
int bio_error; /* Errno for BIO_ERROR. */
long bio_resid; /* Remaining I/0 in bytes. */
- void (*bio_done) __P((struct buf *));
+ void (*bio_done) __P((struct bio *));
void *bio_driver1; /* Private use by the callee. */
void *bio_driver2; /* Private use by the callee. */
void *bio_caller1; /* Private use by the caller. */
@@ -105,6 +106,12 @@ struct bio {
struct iodone_chain *bio_done_chain;
};
+static __inline__ void
+biodone(struct bio *bp)
+{
+ bp->bio_done(bp);
+}
+
/*
* The buffer header describes an I/O operation in the kernel.
*
@@ -127,18 +134,16 @@ struct buf {
#define b_bcount b_io.bio_bcount
#define b_blkno b_io.bio_blkno
#define b_caller1 b_io.bio_caller1
-#define b_caller2 b_io.bio_caller2
#define b_data b_io.bio_data
#define b_dev b_io.bio_dev
#define b_driver1 b_io.bio_driver1
#define b_driver2 b_io.bio_driver2
#define b_error b_io.bio_error
#define b_iocmd b_io.bio_cmd
-#define b_iodone b_io.bio_done
-#define b_iodone_chain b_io.bio_done_chain
#define b_ioflags b_io.bio_flags
#define b_pblkno b_io.bio_pblkno
#define b_resid b_io.bio_resid
+ void (*b_iodone) __P((struct buf *));
off_t b_offset; /* Offset into file. */
LIST_ENTRY(buf) b_hash; /* Hash chain. */
TAILQ_ENTRY(buf) b_vnbufs; /* Buffer's associated vnode. */
@@ -581,7 +586,7 @@ struct buf *getblk __P((struct vnode *, daddr_t, int, int, int));
struct buf *geteblk __P((int));
int bufwait __P((struct buf *));
void bufdone __P((struct buf *));
-void biodone __P((struct bio *));
+void bufdonebio __P((struct bio *));
void cluster_callback __P((struct buf *));
int cluster_read __P((struct vnode *, u_quad_t, daddr_t, long,
OpenPOWER on IntegriCloud