summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-06-16 08:48:51 +0000
committerphk <phk@FreeBSD.org>2000-06-16 08:48:51 +0000
commit4ec91666fac25fe075871c6194581e7842223b07 (patch)
treea9814424289102f1430da05820c25eec0c2114f2 /sys/kern
parent0bbfeb1258f95995e684cee4ce92b26361d8a6b5 (diff)
downloadFreeBSD-src-4ec91666fac25fe075871c6194581e7842223b07.zip
FreeBSD-src-4ec91666fac25fe075871c6194581e7842223b07.tar.gz
Virtualizes & untangles the bioops operations vector.
Ref: Message-ID: <18317.961014572@critter.freebsd.dk> To: current@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_bio.c27
-rw-r--r--sys/kern/vfs_cluster.c5
-rw-r--r--sys/kern/vfs_export.c3
-rw-r--r--sys/kern/vfs_extattr.c5
-rw-r--r--sys/kern/vfs_subr.c3
-rw-r--r--sys/kern/vfs_syscalls.c5
6 files changed, 19 insertions, 29 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 93e4620..dba2151 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -616,8 +616,8 @@ bwrite(struct buf * bp)
newbp->b_flags &= ~B_INVAL;
/* move over the dependencies */
- if (LIST_FIRST(&bp->b_dep) != NULL && bioops.io_movedeps)
- (*bioops.io_movedeps)(bp, newbp);
+ if (LIST_FIRST(&bp->b_dep) != NULL)
+ buf_movedeps(bp, newbp);
/*
* Initiate write on the copy, release the original to
@@ -673,10 +673,10 @@ vfs_backgroundwritedone(bp)
/*
* Process dependencies then return any unfinished ones.
*/
- if (LIST_FIRST(&bp->b_dep) != NULL && bioops.io_complete)
- (*bioops.io_complete)(bp);
- if (LIST_FIRST(&bp->b_dep) != NULL && bioops.io_movedeps)
- (*bioops.io_movedeps)(bp, origbp);
+ if (LIST_FIRST(&bp->b_dep) != NULL)
+ buf_complete(bp);
+ if (LIST_FIRST(&bp->b_dep) != NULL)
+ buf_movedeps(bp, origbp);
/*
* Clear the BX_BKGRDINPROG flag in the original buffer
* and awaken it if it is waiting for the write to complete.
@@ -939,8 +939,8 @@ brelse(struct buf * bp)
* cache the buffer.
*/
bp->b_flags |= B_INVAL;
- if (LIST_FIRST(&bp->b_dep) != NULL && bioops.io_deallocate)
- (*bioops.io_deallocate)(bp);
+ if (LIST_FIRST(&bp->b_dep) != NULL)
+ buf_deallocate(bp);
if (bp->b_flags & B_DELWRI) {
--numdirtybuffers;
numdirtywakeup();
@@ -1570,8 +1570,8 @@ restart:
crfree(bp->b_wcred);
bp->b_wcred = NOCRED;
}
- if (LIST_FIRST(&bp->b_dep) != NULL && bioops.io_deallocate)
- (*bioops.io_deallocate)(bp);
+ if (LIST_FIRST(&bp->b_dep) != NULL)
+ buf_deallocate(bp);
if (bp->b_xflags & BX_BKGRDINPROG)
panic("losing buffer 3");
LIST_REMOVE(bp, b_hash);
@@ -1848,9 +1848,8 @@ flushbufqueues(void)
break;
}
if (LIST_FIRST(&bp->b_dep) != NULL &&
- bioops.io_countdeps &&
(bp->b_flags & B_DEFERRED) == 0 &&
- (*bioops.io_countdeps)(bp, 0)) {
+ buf_countdeps(bp, 0)) {
TAILQ_REMOVE(&bufqueues[QUEUE_DIRTY],
bp, b_freelist);
TAILQ_INSERT_TAIL(&bufqueues[QUEUE_DIRTY],
@@ -2664,8 +2663,8 @@ bufdone(struct buf *bp)
splx(s);
return;
}
- if (LIST_FIRST(&bp->b_dep) != NULL && bioops.io_complete)
- (*bioops.io_complete)(bp);
+ if (LIST_FIRST(&bp->b_dep) != NULL)
+ buf_complete(bp);
if (bp->b_flags & B_VMIO) {
int i, resid;
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index e1c05b0..b1b4b77 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -805,9 +805,8 @@ cluster_wbuild(vp, size, start_lbn, len)
splx(s);
} /* end of code for non-first buffers only */
/* check for latent dependencies to be handled */
- if ((LIST_FIRST(&tbp->b_dep)) != NULL &&
- bioops.io_start)
- (*bioops.io_start)(tbp);
+ if ((LIST_FIRST(&tbp->b_dep)) != NULL)
+ buf_start(tbp);
/*
* If the IO is via the VM then we do some
* special VM hackery. (yuck)
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 670d999..b7b01e6 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -1029,8 +1029,7 @@ sched_sync(void)
/*
* Do soft update processing.
*/
- if (bioops.io_sync)
- (*bioops.io_sync)(NULL);
+ softdep_process_worklist(NULL);
/*
* The variable rushjob allows the kernel to speed up the
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 08e2965..bdb3639 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -2545,10 +2545,7 @@ fsync(p, uap)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_object)
vm_object_page_clean(vp->v_object, 0, 0, 0);
- if ((error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p)) == 0 &&
- vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP) &&
- bioops.io_fsync)
- error = (*bioops.io_fsync)(vp);
+ error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p);
VOP_UNLOCK(vp, 0, p);
return (error);
}
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 670d999..b7b01e6 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1029,8 +1029,7 @@ sched_sync(void)
/*
* Do soft update processing.
*/
- if (bioops.io_sync)
- (*bioops.io_sync)(NULL);
+ softdep_process_worklist(NULL);
/*
* The variable rushjob allows the kernel to speed up the
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 08e2965..bdb3639 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -2545,10 +2545,7 @@ fsync(p, uap)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_object)
vm_object_page_clean(vp->v_object, 0, 0, 0);
- if ((error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p)) == 0 &&
- vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP) &&
- bioops.io_fsync)
- error = (*bioops.io_fsync)(vp);
+ error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p);
VOP_UNLOCK(vp, 0, p);
return (error);
}
OpenPOWER on IntegriCloud