diff options
author | phk <phk@FreeBSD.org> | 2000-05-05 09:59:14 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-05-05 09:59:14 +0000 |
commit | 36c3965ff904c2677211575be5bfa7d3afe80d19 (patch) | |
tree | dc425a5c4e6ca4b753b2fc7c6c3057c50cbbeb92 /sys/dev | |
parent | 5ea491d29e5d066f5e0a88aeb886dbe04c7ada92 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/dev/amr/amr.c | 2 | ||||
-rw-r--r-- | sys/dev/amr/amr_disk.c | 2 | ||||
-rw-r--r-- | sys/dev/amr/amr_pci.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/ata-all.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/ata-disk.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/ata-dma.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/atapi-fd.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/atapi-tape.c | 2 | ||||
-rw-r--r-- | sys/dev/ccd/ccd.c | 2 | ||||
-rw-r--r-- | sys/dev/dpt/dpt_control.c | 1 | ||||
-rw-r--r-- | sys/dev/fdc/fdc.c | 1 | ||||
-rw-r--r-- | sys/dev/ida/ida.c | 2 | ||||
-rw-r--r-- | sys/dev/ida/ida_disk.c | 2 | ||||
-rw-r--r-- | sys/dev/ida/ida_eisa.c | 2 | ||||
-rw-r--r-- | sys/dev/ida/ida_pci.c | 2 | ||||
-rw-r--r-- | sys/dev/mcd/mcd.c | 2 | ||||
-rw-r--r-- | sys/dev/md/md.c | 2 | ||||
-rw-r--r-- | sys/dev/mlx/mlx.c | 2 | ||||
-rw-r--r-- | sys/dev/mlx/mlx_disk.c | 2 | ||||
-rw-r--r-- | sys/dev/mlx/mlx_pci.c | 2 | ||||
-rw-r--r-- | sys/dev/scd/scd.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pcm/sound.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/usb_mem.h | 1 | ||||
-rw-r--r-- | sys/dev/vinum/vinumhdr.h | 1 | ||||
-rw-r--r-- | sys/dev/vn/vn.c | 8 |
26 files changed, 28 insertions, 25 deletions
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index b81403e..380ea36 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -35,7 +35,7 @@ #include <sys/malloc.h> #include <sys/kernel.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/conf.h> #include <sys/devicestat.h> diff --git a/sys/dev/amr/amr_disk.c b/sys/dev/amr/amr_disk.c index 9d6be1d..1e5082a 100644 --- a/sys/dev/amr/amr_disk.c +++ b/sys/dev/amr/amr_disk.c @@ -35,7 +35,7 @@ #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/conf.h> #include <sys/devicestat.h> diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c index a144fcc..fc9f8a9 100644 --- a/sys/dev/amr/amr_pci.c +++ b/sys/dev/amr/amr_pci.c @@ -31,7 +31,7 @@ #include <sys/kernel.h> #include <sys/bus.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/conf.h> #include <sys/devicestat.h> #include <sys/disk.h> diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 17fa2ef..41e802f 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -44,7 +44,7 @@ #include <sys/disk.h> #include <sys/module.h> #include <sys/bus.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/malloc.h> #include <sys/devicestat.h> #include <sys/sysctl.h> diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index 2f0460f..627366c 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -36,7 +36,7 @@ #include <sys/kernel.h> #include <sys/proc.h> #include <sys/malloc.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/conf.h> #include <sys/disk.h> diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c index dc96bde..cd586ca 100644 --- a/sys/dev/ata/ata-dma.c +++ b/sys/dev/ata/ata-dma.c @@ -31,7 +31,7 @@ #include "pci.h" #include <sys/param.h> #include <sys/systm.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/malloc.h> #include <sys/bus.h> #include <sys/disk.h> diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index 65b2ae5..9cd87d2 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -33,7 +33,7 @@ #include <sys/kernel.h> #include <sys/proc.h> #include <sys/malloc.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/disklabel.h> #include <sys/devicestat.h> diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c index b1e2051..abeac02 100644 --- a/sys/dev/ata/atapi-fd.c +++ b/sys/dev/ata/atapi-fd.c @@ -33,7 +33,7 @@ #include <sys/kernel.h> #include <sys/proc.h> #include <sys/malloc.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/conf.h> #include <sys/disk.h> diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c index 092891f..aaa2be7 100644 --- a/sys/dev/ata/atapi-tape.c +++ b/sys/dev/ata/atapi-tape.c @@ -33,7 +33,7 @@ #include <sys/kernel.h> #include <sys/conf.h> #include <sys/malloc.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/mtio.h> #include <sys/disklabel.h> diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index ad301ab..3f62c1a 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -94,7 +94,7 @@ #include <sys/kernel.h> #include <sys/module.h> #include <sys/proc.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/malloc.h> #include <sys/namei.h> #include <sys/conf.h> diff --git a/sys/dev/dpt/dpt_control.c b/sys/dev/dpt/dpt_control.c index 474eb88..ef3ddf2 100644 --- a/sys/dev/dpt/dpt_control.c +++ b/sys/dev/dpt/dpt_control.c @@ -45,6 +45,7 @@ #include <sys/systm.h> #include <sys/malloc.h> #include <sys/kernel.h> +#include <sys/bio.h> #include <sys/buf.h> #include <sys/uio.h> #include <sys/conf.h> diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index cd4df13..f3d47b4 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -57,6 +57,7 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/bio.h> #include <sys/buf.h> #include <sys/bus.h> #include <sys/conf.h> diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c index e76c56a..d10986c 100644 --- a/sys/dev/ida/ida.c +++ b/sys/dev/ida/ida.c @@ -44,7 +44,7 @@ #include <sys/systm.h> #include <sys/malloc.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/devicestat.h> #include <sys/disk.h> diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index 72a6f04..47e32a9 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -34,7 +34,7 @@ #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/conf.h> #include <sys/devicestat.h> diff --git a/sys/dev/ida/ida_eisa.c b/sys/dev/ida/ida_eisa.c index fd3fd29..93b8bdf 100644 --- a/sys/dev/ida/ida_eisa.c +++ b/sys/dev/ida/ida_eisa.c @@ -32,7 +32,7 @@ #include <sys/kernel.h> #include <sys/bus.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/devicestat.h> #include <sys/disk.h> diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c index 0bb7e9f..04cf5c7 100644 --- a/sys/dev/ida/ida_pci.c +++ b/sys/dev/ida/ida_pci.c @@ -30,7 +30,7 @@ #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/devicestat.h> #include <sys/disk.h> diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 1bdc726..aeb5e4c 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -49,7 +49,7 @@ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; #include <sys/systm.h> #include <sys/conf.h> #include <sys/fcntl.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/cdio.h> #include <sys/disklabel.h> #include <sys/kernel.h> diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 44a7cef..3543a06 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -15,7 +15,7 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/conf.h> #include <sys/devicestat.h> #include <sys/disk.h> diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index cc226e88..942bebb 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -35,7 +35,7 @@ #include <sys/malloc.h> #include <sys/kernel.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/conf.h> #include <sys/devicestat.h> diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c index 15af6b7..190f7a7 100644 --- a/sys/dev/mlx/mlx_disk.c +++ b/sys/dev/mlx/mlx_disk.c @@ -35,7 +35,7 @@ #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/bus.h> #include <sys/conf.h> #include <sys/devicestat.h> diff --git a/sys/dev/mlx/mlx_pci.c b/sys/dev/mlx/mlx_pci.c index 6fe9a56..9a5a658 100644 --- a/sys/dev/mlx/mlx_pci.c +++ b/sys/dev/mlx/mlx_pci.c @@ -31,7 +31,7 @@ #include <sys/kernel.h> #include <sys/bus.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/conf.h> #include <sys/devicestat.h> #include <sys/disk.h> diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c index d0ae35e..7c83434 100644 --- a/sys/dev/scd/scd.c +++ b/sys/dev/scd/scd.c @@ -51,7 +51,7 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> -#include <sys/buf.h> +#include <sys/bio.h> #include <sys/cdio.h> #include <sys/disklabel.h> #include <sys/kernel.h> diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index e456597..9520c29 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -55,6 +55,7 @@ #include <sys/errno.h> #include <sys/malloc.h> #include <sys/bus.h> +#include <sys/bio.h> #include <sys/buf.h> #include <machine/clock.h> /* for DELAY */ #include <machine/resource.h> diff --git a/sys/dev/usb/usb_mem.h b/sys/dev/usb/usb_mem.h index ac19b84..35f0853 100644 --- a/sys/dev/usb/usb_mem.h +++ b/sys/dev/usb/usb_mem.h @@ -68,6 +68,7 @@ void usb_freemem __P((usbd_bus_handle, usb_dma_t *)); #include <sys/systm.h> #include <sys/queue.h> #include <sys/proc.h> +#include <sys/bio.h> #include <sys/buf.h> #include <sys/malloc.h> #include <sys/kernel.h> diff --git a/sys/dev/vinum/vinumhdr.h b/sys/dev/vinum/vinumhdr.h index 9fa4f58..2f46ddf 100644 --- a/sys/dev/vinum/vinumhdr.h +++ b/sys/dev/vinum/vinumhdr.h @@ -49,6 +49,7 @@ #include <sys/proc.h> #include <sys/errno.h> #include <sys/dkstat.h> +#include <sys/bio.h> #include <sys/buf.h> #include <sys/malloc.h> #include <sys/uio.h> 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; |