summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cluster.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/kern/vfs_cluster.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/kern/vfs_cluster.c')
-rw-r--r--sys/kern/vfs_cluster.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index de6b67e..8a6e045 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -755,6 +755,8 @@ cluster_wbuild(vp, size, start_lbn, len)
*/
TAILQ_INIT(&bp->b_cluster.cluster_head);
bp->b_bcount = 0;
+ bp->b_magic = tbp->b_magic;
+ bp->b_op = tbp->b_op;
bp->b_bufsize = 0;
bp->b_npages = 0;
if (tbp->b_wcred != NOCRED) {
OpenPOWER on IntegriCloud