summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_pager.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2001-04-17 08:56:39 +0000
committerphk <phk@FreeBSD.org>2001-04-17 08:56:39 +0000
commit378e561228360a3c0ad7f34be404abec95457c90 (patch)
treec2dc888d5361454aab94e341449bda307b726c8b /sys/vm/vm_pager.c
parent922e3083ccc90b69264f72c32d897dfa6c0c2495 (diff)
downloadFreeBSD-src-378e561228360a3c0ad7f34be404abec95457c90.zip
FreeBSD-src-378e561228360a3c0ad7f34be404abec95457c90.tar.gz
This patch removes the VOP_BWRITE() vector.
VOP_BWRITE() was a hack which made it possible for NFS client side to use struct buf with non-bio backing. This patch takes a more general approach and adds a bp->b_op vector where more methods can be added. The success of this patch depends on bp->b_op being initialized all relevant places for some value of "relevant" which is not easy to determine. For now the buffers have grown a b_magic element which will make such issues a tiny bit easier to debug.
Diffstat (limited to 'sys/vm/vm_pager.c')
-rw-r--r--sys/vm/vm_pager.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c
index f8cea1b..b13c9c0 100644
--- a/sys/vm/vm_pager.c
+++ b/sys/vm/vm_pager.c
@@ -355,6 +355,8 @@ initpbuf(struct buf *bp)
bp->b_ioflags = 0;
bp->b_iodone = NULL;
bp->b_error = 0;
+ bp->b_magic = B_MAGIC_BIO;
+ bp->b_op = &buf_ops_bio;
BUF_LOCK(bp, LK_EXCLUSIVE);
}
OpenPOWER on IntegriCloud