summaryrefslogtreecommitdiffstats
path: root/sys/dev/vn
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-05-05 09:59:14 +0000
committerphk <phk@FreeBSD.org>2000-05-05 09:59:14 +0000
commit36c3965ff904c2677211575be5bfa7d3afe80d19 (patch)
treedc425a5c4e6ca4b753b2fc7c6c3057c50cbbeb92 /sys/dev/vn
parent5ea491d29e5d066f5e0a88aeb886dbe04c7ada92 (diff)
downloadFreeBSD-src-36c3965ff904c2677211575be5bfa7d3afe80d19.zip
FreeBSD-src-36c3965ff904c2677211575be5bfa7d3afe80d19.tar.gz
Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
Diffstat (limited to 'sys/dev/vn')
-rw-r--r--sys/dev/vn/vn.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c
index f8ba7e9..b59e317 100644
--- a/sys/dev/vn/vn.c
+++ b/sys/dev/vn/vn.c
@@ -65,7 +65,7 @@
#include <sys/kernel.h>
#include <sys/namei.h>
#include <sys/proc.h>
-#include <sys/buf.h>
+#include <sys/bio.h>
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/vnode.h>
@@ -136,7 +136,6 @@ struct vn_softc {
vm_object_t sc_object; /* backing object if not NULL */
struct ucred *sc_cred; /* credentials */
int sc_maxactive; /* max # of active requests */
- struct buf sc_tab; /* transfer queue */
u_long sc_options; /* options */
SLIST_ENTRY(vn_softc) sc_list;
};
@@ -300,8 +299,8 @@ vnstrategy(struct bio *bp)
IFOPT(vn, VN_LABELS) {
if (vn->sc_slices != NULL && dscheck(bp, vn->sc_slices) <= 0) {
- /* XXX: Normal B_ERROR processing, instead ? */
- bp->bio_flags |= B_INVAL;
+ bp->bio_error = EINVAL;
+ bp->bio_flags |= BIO_ERROR;
biodone(bp);
return;
}
@@ -316,7 +315,6 @@ vnstrategy(struct bio *bp)
if (bp->bio_bcount % vn->sc_secsize != 0 ||
bp->bio_blkno % (vn->sc_secsize / DEV_BSIZE) != 0) {
bp->bio_error = EINVAL;
- /* XXX bp->b_flags |= B_INVAL; */
bp->bio_flags |= BIO_ERROR;
biodone(bp);
return;
OpenPOWER on IntegriCloud