summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/aac/aac.c1
-rw-r--r--sys/dev/aac/aac_cam.c1
-rw-r--r--sys/dev/aac/aac_debug.c1
-rw-r--r--sys/dev/aac/aac_disk.c9
-rw-r--r--sys/dev/aac/aac_pci.c1
-rw-r--r--sys/dev/aac/aacvar.h1
-rw-r--r--sys/dev/amr/amr.c1
-rw-r--r--sys/dev/amr/amr_cam.c1
-rw-r--r--sys/dev/amr/amr_compat.h2
-rw-r--r--sys/dev/amr/amr_disk.c9
-rw-r--r--sys/dev/amr/amr_pci.c1
-rw-r--r--sys/dev/amr/amrvar.h1
-rw-r--r--sys/dev/ata/ata-all.c1
-rw-r--r--sys/dev/ata/ata-disk.c15
-rw-r--r--sys/dev/ata/ata-disk.h1
-rw-r--r--sys/dev/ata/ata-raid.c1
-rw-r--r--sys/dev/ata/atapi-cam.c1
-rw-r--r--sys/dev/ata/atapi-fd.c11
-rw-r--r--sys/dev/ata/atapi-fd.h1
-rw-r--r--sys/dev/ccd/ccd.c18
-rw-r--r--sys/dev/ciss/ciss.c1
-rw-r--r--sys/dev/firewire/sbp.c1
-rw-r--r--sys/dev/ida/ida.c1
-rw-r--r--sys/dev/ida/ida_disk.c10
-rw-r--r--sys/dev/ida/ida_eisa.c1
-rw-r--r--sys/dev/ida/ida_pci.c1
-rw-r--r--sys/dev/ida/idavar.h1
-rw-r--r--sys/dev/md/md.c14
-rw-r--r--sys/dev/mlx/mlx.c1
-rw-r--r--sys/dev/mlx/mlx_compat.h4
-rw-r--r--sys/dev/mlx/mlx_disk.c7
-rw-r--r--sys/dev/mlx/mlx_pci.c1
-rw-r--r--sys/dev/mlx/mlxvar.h1
-rw-r--r--sys/dev/mly/mly.c1
-rw-r--r--sys/dev/ofw/ofw_disk.c2
-rw-r--r--sys/dev/ppbus/vpo.c2
-rw-r--r--sys/dev/pst/pst-raid.c16
-rw-r--r--sys/dev/raidframe/rf_freebsdkintf.c13
-rw-r--r--sys/dev/twe/twe_compat.h4
-rw-r--r--sys/dev/twe/twe_freebsd.c9
-rw-r--r--sys/dev/usb/umass.c1
-rw-r--r--sys/dev/vinum/vinum.c1
42 files changed, 16 insertions, 155 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 0eb036c..8a16794 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -46,7 +46,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <sys/signalvar.h>
#include <sys/time.h>
diff --git a/sys/dev/aac/aac_cam.c b/sys/dev/aac/aac_cam.c
index 37b5833..d822dca 100644
--- a/sys/dev/aac/aac_cam.c
+++ b/sys/dev/aac/aac_cam.c
@@ -48,7 +48,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <machine/md_var.h>
diff --git a/sys/dev/aac/aac_debug.c b/sys/dev/aac/aac_debug.c
index 36cfa4f..a72f9c9 100644
--- a/sys/dev/aac/aac_debug.c
+++ b/sys/dev/aac/aac_debug.c
@@ -40,7 +40,6 @@
#include <dev/aac/aac_compat.h>
#include <sys/bus.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <machine/resource.h>
diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c
index 6351175..48288c1 100644
--- a/sys/dev/aac/aac_disk.c
+++ b/sys/dev/aac/aac_disk.c
@@ -38,7 +38,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <vm/vm.h>
@@ -175,7 +174,6 @@ aac_disk_strategy(struct bio *bp)
/* pass the bio to the controller - it can work out who we are */
AAC_LOCK_ACQUIRE(&sc->ad_controller->aac_io_lock);
- devstat_start_transaction(&sc->ad_stats);
aac_submit_bio(bp);
AAC_LOCK_RELEASE(&sc->ad_controller->aac_io_lock);
@@ -282,7 +280,6 @@ aac_biodone(struct bio *bp)
sc = (struct aac_disk *)bp->bio_disk->d_drv1;
- devstat_end_transaction_bio(&sc->ad_stats, bp);
if (bp->bio_flags & BIO_ERROR)
disk_err(bp, "hard error", -1, 1);
@@ -340,11 +337,6 @@ aac_disk_attach(device_t dev)
sc->ad_size / ((1024 * 1024) / AAC_BLOCK_SIZE),
sc->ad_size);
- devstat_add_entry(&sc->ad_stats, "aacd", device_get_unit(dev),
- AAC_BLOCK_SIZE, DEVSTAT_NO_ORDERED_TAGS,
- DEVSTAT_TYPE_STORARRAY | DEVSTAT_TYPE_IF_OTHER,
- DEVSTAT_PRIORITY_ARRAY);
-
/* attach a generic disk device to ourselves */
sc->unit = device_get_unit(dev);
sc->ad_disk.d_drv1 = sc;
@@ -378,7 +370,6 @@ aac_disk_detach(device_t dev)
if (sc->ad_flags & AAC_DISK_OPEN)
return(EBUSY);
- devstat_remove_entry(&sc->ad_stats);
disk_destroy(&sc->ad_disk);
return(0);
diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c
index 1a4545f..85fed9d 100644
--- a/sys/dev/aac/aac_pci.c
+++ b/sys/dev/aac/aac_pci.c
@@ -42,7 +42,6 @@
#include <sys/bio.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <machine/bus_memio.h>
diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h
index 0125ec7..7ee8dc6 100644
--- a/sys/dev/aac/aacvar.h
+++ b/sys/dev/aac/aacvar.h
@@ -124,7 +124,6 @@ struct aac_disk
struct aac_softc *ad_controller;
struct aac_container *ad_container;
struct disk ad_disk;
- struct devstat ad_stats;
int ad_flags;
#define AAC_DISK_OPEN (1<<0)
int ad_cylinders;
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index 3b58af5..170ff98 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -68,7 +68,6 @@
#include <dev/amr/amr_compat.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <sys/stat.h>
diff --git a/sys/dev/amr/amr_cam.c b/sys/dev/amr/amr_cam.c
index 603a751..1c8f6b6 100644
--- a/sys/dev/amr/amr_cam.c
+++ b/sys/dev/amr/amr_cam.c
@@ -64,7 +64,6 @@
#include <dev/amr/amr_compat.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <sys/stat.h>
diff --git a/sys/dev/amr/amr_compat.h b/sys/dev/amr/amr_compat.h
index 9bd5dc8..33a09f0 100644
--- a/sys/dev/amr/amr_compat.h
+++ b/sys/dev/amr/amr_compat.h
@@ -91,7 +91,7 @@
#else
# include <sys/bio.h>
# define BIO_IS_READ(x) ((x)->bio_cmd == BIO_READ)
-# define AMR_BIO_FINISH(x) biofinish(x, &sc->amrd_stats, 0)
+# define AMR_BIO_FINISH(x) biodone(x)
#endif
/************************************************************************
diff --git a/sys/dev/amr/amr_disk.c b/sys/dev/amr/amr_disk.c
index 2960bda6..4266f15 100644
--- a/sys/dev/amr/amr_disk.c
+++ b/sys/dev/amr/amr_disk.c
@@ -68,7 +68,6 @@
#include <dev/amr/amr_compat.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <machine/bus.h>
@@ -161,7 +160,6 @@ amrd_strategy(struct bio *bio)
goto bad;
}
- devstat_start_transaction(&sc->amrd_stats);
amr_submit_bio(sc->amrd_controller, bio);
return;
@@ -180,7 +178,6 @@ void
amrd_intr(void *data)
{
struct bio *bio = (struct bio *)data;
- struct amrd_softc *sc = (struct amrd_softc *)bio->bio_disk->d_drv1;
debug_called(2);
@@ -223,11 +220,6 @@ amrd_attach(device_t dev)
sc->amrd_drive->al_size, sc->amrd_drive->al_properties & AMR_DRV_RAID_MASK,
amr_describe_code(amr_table_drvstate, AMR_DRV_CURSTATE(sc->amrd_drive->al_state)));
- devstat_add_entry(&sc->amrd_stats, "amrd", sc->amrd_unit, AMR_BLKSIZE,
- DEVSTAT_NO_ORDERED_TAGS,
- DEVSTAT_TYPE_STORARRAY | DEVSTAT_TYPE_IF_OTHER,
- DEVSTAT_PRIORITY_ARRAY);
-
sc->amrd_disk.d_drv1 = sc;
sc->amrd_disk.d_maxsize = (AMR_NSEG - 1) * PAGE_SIZE;
sc->amrd_disk.d_open = amrd_open;
@@ -251,7 +243,6 @@ amrd_detach(device_t dev)
if (sc->amrd_disk.d_flags & DISKFLAG_OPEN)
return(EBUSY);
- devstat_remove_entry(&sc->amrd_stats);
#ifdef FREEBSD_4
if (--disks_registered == 0)
cdevsw_remove(&amrddisk_cdevsw);
diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c
index f870d4c..caffc5d 100644
--- a/sys/dev/amr/amr_pci.c
+++ b/sys/dev/amr/amr_pci.c
@@ -63,7 +63,6 @@
#include <dev/amr/amr_compat.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <machine/bus_memio.h>
diff --git a/sys/dev/amr/amrvar.h b/sys/dev/amr/amrvar.h
index bc6f4ae..a9bca40 100644
--- a/sys/dev/amr/amrvar.h
+++ b/sys/dev/amr/amrvar.h
@@ -253,7 +253,6 @@ struct amrd_softc
struct amr_softc *amrd_controller;
struct amr_logdrive *amrd_drive;
struct disk amrd_disk;
- struct devstat amrd_stats;
int amrd_unit;
};
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index fae76a5..657a7c7 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -39,7 +39,6 @@
#include <sys/bus.h>
#include <sys/bio.h>
#include <sys/malloc.h>
-#include <sys/devicestat.h>
#include <sys/stdint.h>
#include <sys/sysctl.h>
#include <machine/stdarg.h>
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 1428132..9193c65 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -38,7 +38,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/disk.h>
-#include <sys/devicestat.h>
#include <sys/cons.h>
#include <sys/sysctl.h>
#include <vm/vm.h>
@@ -185,11 +184,6 @@ ad_attach(struct ata_device *atadev)
#endif
ATA_UNLOCK_CH(atadev->channel);
- devstat_add_entry(&adp->stats, "ad", adp->lun, DEV_BSIZE,
- DEVSTAT_NO_ORDERED_TAGS,
- DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_IDE,
- DEVSTAT_PRIORITY_DISK);
-
adp->disk.d_open = adopen;
adp->disk.d_close = adclose;
adp->disk.d_strategy = adstrategy;
@@ -242,7 +236,6 @@ ad_detach(struct ata_device *atadev, int flush) /* get rid of flush XXX SOS */
biofinish(bp, NULL, ENXIO);
}
disk_destroy(&adp->disk);
- devstat_remove_entry(&adp->stats);
if (flush) {
if (ata_command(atadev, ATA_C_FLUSHCACHE, 0, 0, 0, ATA_WAIT_READY))
ata_prtdev(atadev, "flushing cache on detach failed\n");
@@ -437,8 +430,6 @@ ad_transfer(struct ad_request *request)
adp->device->flags |= ATA_D_USE_CHS;
}
- devstat_start_transaction(&adp->stats);
-
/* does this drive & transfer work with DMA ? */
request->flags &= ~ADR_F_DMA_USED;
if (adp->device->mode >= ATA_DMA &&
@@ -546,7 +537,7 @@ transfer_failed:
request->bp->bio_error = EIO;
request->bp->bio_flags |= BIO_ERROR;
request->bp->bio_resid = request->bytecount;
- biofinish(request->bp, &adp->stats, 0);
+ biodone(request->bp);
ad_free(request);
}
ata_reinit(adp->device->channel);
@@ -660,7 +651,7 @@ ad_interrupt(struct ad_request *request)
request->bp->bio_resid = request->bytecount;
- biofinish(request->bp, &adp->stats, 0);
+ biodone(request->bp);
ad_free(request);
adp->outstanding--;
@@ -856,7 +847,7 @@ ad_timeout(struct ad_request *request)
/* retries all used up, return error */
request->bp->bio_error = EIO;
request->bp->bio_flags |= BIO_ERROR;
- biofinish(request->bp, &adp->stats, 0);
+ biodone(request->bp);
ad_free(request);
}
ata_reinit(adp->device->channel);
diff --git a/sys/dev/ata/ata-disk.h b/sys/dev/ata/ata-disk.h
index 505690e..f680927 100644
--- a/sys/dev/ata/ata-disk.h
+++ b/sys/dev/ata/ata-disk.h
@@ -71,7 +71,6 @@ struct ad_softc {
struct ad_request *tags[32]; /* tag array of requests */
int outstanding; /* tags not serviced yet */
struct bio_queue_head queue; /* head of request queue */
- struct devstat stats; /* devstat entry */
struct disk disk; /* disklabel/slice stuff */
};
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c
index e5f5b6a..4f6f0e7 100644
--- a/sys/dev/ata/ata-raid.c
+++ b/sys/dev/ata/ata-raid.c
@@ -39,7 +39,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/disk.h>
-#include <sys/devicestat.h>
#include <sys/cons.h>
#include <sys/unistd.h>
#include <sys/kthread.h>
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c
index 0d703c2..81c10fc 100644
--- a/sys/dev/ata/atapi-cam.c
+++ b/sys/dev/ata/atapi-cam.c
@@ -31,7 +31,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
-#include <sys/devicestat.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/ata.h>
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index e4f6cb8..0da55dd 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -37,7 +37,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/disk.h>
-#include <sys/devicestat.h>
#include <sys/cdio.h>
#include <machine/bus.h>
#include <dev/ata/ata-all.h>
@@ -83,10 +82,6 @@ afdattach(struct ata_device *atadev)
return 0;
}
- devstat_add_entry(&fdp->stats, "afd", fdp->lun, DEV_BSIZE,
- DEVSTAT_NO_ORDERED_TAGS,
- DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_IDE,
- DEVSTAT_PRIORITY_WFD);
fdp->disk.d_open = afdopen;
fdp->disk.d_close = afdclose;
#ifdef notyet
@@ -115,7 +110,6 @@ afddetach(struct ata_device *atadev)
biofinish(bp, NULL, ENXIO);
}
disk_destroy(&fdp->disk);
- devstat_remove_entry(&fdp->stats);
ata_free_name(atadev);
ata_free_lun(&afd_lun_map, fdp->lun);
free(fdp, M_AFD);
@@ -334,8 +328,6 @@ afd_start(struct ata_device *atadev)
ccb[7] = count>>8;
ccb[8] = count;
- devstat_start_transaction(&fdp->stats);
-
atapi_queue_cmd(fdp->device, ccb, data_ptr, count * fdp->cap.sector_size,
(bp->bio_cmd == BIO_READ) ? ATPR_F_READ : 0, 30,
afd_done, bp);
@@ -345,7 +337,6 @@ static int
afd_done(struct atapi_request *request)
{
struct bio *bp = request->driver;
- struct afd_softc *fdp = request->device->driver;
if (request->error || (bp->bio_flags & BIO_ERROR)) {
bp->bio_error = request->error;
@@ -353,7 +344,7 @@ afd_done(struct atapi_request *request)
}
else
bp->bio_resid = bp->bio_bcount - request->donecount;
- biofinish(bp, &fdp->stats, 0);
+ biodone(bp);
return 0;
}
diff --git a/sys/dev/ata/atapi-fd.h b/sys/dev/ata/atapi-fd.h
index dc38fe3..8979409 100644
--- a/sys/dev/ata/atapi-fd.h
+++ b/sys/dev/ata/atapi-fd.h
@@ -74,6 +74,5 @@ struct afd_softc {
struct bio_queue_head queue; /* queue of i/o requests */
struct afd_cappage cap; /* capabilities page info */
struct disk disk; /* virtual drives */
- struct devstat stats;
};
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index 3abc28f..b973246 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -66,7 +66,6 @@
#include <sys/stdint.h>
#include <sys/sysctl.h>
#include <sys/disk.h>
-#include <sys/devicestat.h>
#include <sys/fcntl.h>
#include <sys/vnode.h>
@@ -389,14 +388,6 @@ ccdinit(struct ccd_s *cs, char **cpaths, struct thread *td)
ccg->ccg_nsectors = 1024 * 1024 / ccg->ccg_secsize;
ccg->ccg_ncylinders = cs->sc_size / ccg->ccg_nsectors;
- /*
- * Add a devstat entry for this device.
- */
- devstat_add_entry(&cs->device_stats, "ccd", cs->sc_unit,
- ccg->ccg_secsize, DEVSTAT_ALL_SUPPORTED,
- DEVSTAT_TYPE_STORARRAY |DEVSTAT_TYPE_IF_OTHER,
- DEVSTAT_PRIORITY_ARRAY);
-
cs->sc_flags |= CCDF_INITED;
cs->sc_cflags = cs->sc_flags; /* So we can find out later... */
return (0);
@@ -574,10 +565,6 @@ ccdstart(struct ccd_s *cs, struct bio *bp)
daddr_t bn;
int err;
-
- /* Record the transaction start */
- devstat_start_transaction(&cs->device_stats);
-
/*
* Translate the partition-relative block number to an absolute.
*/
@@ -909,7 +896,7 @@ ccdiodone(struct bio *ibp)
if (bp->bio_resid == 0) {
if (bp->bio_flags & BIO_ERROR)
bp->bio_resid = bp->bio_bcount;
- biofinish(bp, &cs->device_stats, 0);
+ biodone(bp);
}
}
@@ -1180,9 +1167,6 @@ ccdioctltoo(int unit, u_long cmd, caddr_t data, int flag, struct thread *td)
free(cs->sc_itable, M_CCD);
free(cs->sc_vpp, M_CCD);
- /* And remove the devstat entry. */
- devstat_remove_entry(&cs->device_stats);
-
/* This must be atomic. */
ccdunlock(cs);
ccddestroy(cs);
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 5b41162..4cf6271 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -74,7 +74,6 @@
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/stat.h>
#include <sys/stdint.h>
diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c
index 8d9f306..be9193a 100644
--- a/sys/dev/firewire/sbp.c
+++ b/sys/dev/firewire/sbp.c
@@ -42,7 +42,6 @@
#include <sys/sysctl.h>
#include <machine/bus.h>
#include <sys/malloc.h>
-#include <sys/devicestat.h> /* for struct devstat */
#include <cam/cam.h>
diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c
index 2f725b1..464ad87 100644
--- a/sys/dev/ida/ida.c
+++ b/sys/dev/ida/ida.c
@@ -46,7 +46,6 @@
#include <sys/bio.h>
#include <sys/bus.h>
-#include <sys/devicestat.h>
#include <sys/conf.h>
#include <sys/disk.h>
diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c
index c7cc93e..7efb8de 100644
--- a/sys/dev/ida/ida_disk.c
+++ b/sys/dev/ida/ida_disk.c
@@ -38,7 +38,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/cons.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <machine/bus_memio.h>
@@ -105,7 +104,6 @@ idad_strategy(struct bio *bp)
}
s = splbio();
- devstat_start_transaction(&drv->stats);
ida_submit_buf(drv->controller, bp);
splx(s);
return;
@@ -156,7 +154,7 @@ idad_intr(struct bio *bp)
else
bp->bio_resid = 0;
- biofinish(bp, &drv->stats, 0);
+ biodone(bp);
}
static int
@@ -202,11 +200,6 @@ idad_attach(device_t dev)
drv->secperunit / ((1024 * 1024) / drv->secsize),
drv->secperunit, drv->secsize);
- devstat_add_entry(&drv->stats, "idad", drv->unit, drv->secsize,
- DEVSTAT_NO_ORDERED_TAGS,
- DEVSTAT_TYPE_STORARRAY| DEVSTAT_TYPE_IF_OTHER,
- DEVSTAT_PRIORITY_ARRAY);
-
drv->disk.d_strategy = idad_strategy;
drv->disk.d_name = "idad";
drv->disk.d_dump = idad_dump;
@@ -227,7 +220,6 @@ idad_detach(device_t dev)
struct idad_softc *drv;
drv = (struct idad_softc *)device_get_softc(dev);
- devstat_remove_entry(&drv->stats);
disk_destroy(&drv->disk);
return (0);
}
diff --git a/sys/dev/ida/ida_eisa.c b/sys/dev/ida/ida_eisa.c
index c041fe2..eca4722 100644
--- a/sys/dev/ida/ida_eisa.c
+++ b/sys/dev/ida/ida_eisa.c
@@ -33,7 +33,6 @@
#include <sys/bus.h>
#include <sys/bio.h>
-#include <sys/devicestat.h>
#include <sys/conf.h>
#include <sys/disk.h>
diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c
index 00f1bc7..f7194a4 100644
--- a/sys/dev/ida/ida_pci.c
+++ b/sys/dev/ida/ida_pci.c
@@ -32,7 +32,6 @@
#include <sys/bio.h>
#include <sys/bus.h>
-#include <sys/devicestat.h>
#include <sys/conf.h>
#include <sys/disk.h>
diff --git a/sys/dev/ida/idavar.h b/sys/dev/ida/idavar.h
index c11438e..4d5a9d6 100644
--- a/sys/dev/ida/idavar.h
+++ b/sys/dev/ida/idavar.h
@@ -170,7 +170,6 @@ struct idad_softc {
device_t dev;
struct ida_softc *controller;
struct disk disk;
- struct devstat stats;
int drive; /* per controller */
int unit; /* global */
int cylinders;
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 7b754cb..232eba8 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -64,7 +64,6 @@
#include <sys/systm.h>
#include <sys/bio.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <sys/fcntl.h>
#include <sys/kernel.h>
@@ -143,7 +142,6 @@ struct indir {
struct md_s {
int unit;
LIST_ENTRY(md_s) list;
- struct devstat stats;
struct bio_queue_head bio_queue;
struct mtx queue_mtx;
struct disk disk;
@@ -594,15 +592,12 @@ md_kthread(void *arg)
switch (sc->type) {
case MD_MALLOC:
- devstat_start_transaction(&sc->stats);
error = mdstart_malloc(sc, bp);
break;
case MD_PRELOAD:
- devstat_start_transaction(&sc->stats);
error = mdstart_preload(sc, bp);
break;
case MD_VNODE:
- devstat_start_transaction(&sc->stats);
error = mdstart_vnode(sc, bp);
break;
case MD_SWAP:
@@ -672,11 +667,6 @@ static void
mdinit(struct md_s *sc)
{
- devstat_add_entry(&sc->stats, MD_NAME, sc->unit, sc->secsize,
- DEVSTAT_NO_ORDERED_TAGS,
- DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_OTHER,
- DEVSTAT_PRIORITY_OTHER);
- {
struct g_geom *gp;
struct g_provider *pp;
@@ -694,7 +684,6 @@ mdinit(struct md_s *sc)
g_error_provider(pp, 0);
g_topology_unlock();
PICKUP_GIANT();
- }
}
/*
@@ -909,15 +898,12 @@ mddestroy(struct md_s *sc, struct thread *td)
GIANT_REQUIRED;
mtx_destroy(&sc->queue_mtx);
- devstat_remove_entry(&sc->stats);
- {
if (sc->gp) {
sc->gp->flags |= G_GEOM_WITHER;
sc->gp->softc = NULL;
}
if (sc->pp)
g_orphan_provider(sc->pp, ENXIO);
- }
sc->flags |= MD_SHUTDOWN;
wakeup(sc);
while (sc->procp != NULL)
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index df8c03d..d8841de 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -37,7 +37,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <sys/stat.h>
diff --git a/sys/dev/mlx/mlx_compat.h b/sys/dev/mlx/mlx_compat.h
index aa69ba6..7160c3d 100644
--- a/sys/dev/mlx/mlx_compat.h
+++ b/sys/dev/mlx/mlx_compat.h
@@ -71,7 +71,7 @@ typedef struct bio_queue_head mlx_bioq;
# define MLX_BIO_HAS_ERROR(bp) ((bp)->bio_flags & BIO_ERROR)
# define MLX_BIO_RESID(bp) (bp)->bio_resid
# define MLX_BIO_DONE(bp) biodone(bp) /* XXX nice to integrate bio_finish here */
-# define MLX_BIO_STATS_START(bp) devstat_start_transaction(&((struct mlxd_softc *)MLX_BIO_SOFTC(bp))->mlxd_stats)
-# define MLX_BIO_STATS_END(bp) devstat_end_transaction_bio(&((struct mlxd_softc *)MLX_BIO_SOFTC(bp))->mlxd_stats, bp)
+# define MLX_BIO_STATS_START(bp)
+# define MLX_BIO_STATS_END(bp)
#endif
diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c
index f660924..0b8664f 100644
--- a/sys/dev/mlx/mlx_disk.c
+++ b/sys/dev/mlx/mlx_disk.c
@@ -37,7 +37,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <machine/bus.h>
@@ -217,11 +216,6 @@ mlxd_attach(device_t dev)
sc->mlxd_drive->ms_size / ((1024 * 1024) / MLX_BLKSIZE),
sc->mlxd_drive->ms_size, sc->mlxd_drive->ms_raidlevel, state);
- devstat_add_entry(&sc->mlxd_stats, "mlxd", sc->mlxd_unit, MLX_BLKSIZE,
- DEVSTAT_NO_ORDERED_TAGS,
- DEVSTAT_TYPE_STORARRAY | DEVSTAT_TYPE_IF_OTHER,
- DEVSTAT_PRIORITY_ARRAY);
-
sc->mlxd_disk.d_open = mlxd_open;
sc->mlxd_disk.d_close = mlxd_close;
sc->mlxd_disk.d_ioctl = mlxd_ioctl;
@@ -257,7 +251,6 @@ mlxd_detach(device_t dev)
debug_called(1);
- devstat_remove_entry(&sc->mlxd_stats);
disk_destroy(&sc->mlxd_disk);
return(0);
diff --git a/sys/dev/mlx/mlx_pci.c b/sys/dev/mlx/mlx_pci.c
index 741c682..4a21246 100644
--- a/sys/dev/mlx/mlx_pci.c
+++ b/sys/dev/mlx/mlx_pci.c
@@ -32,7 +32,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
-#include <sys/devicestat.h>
#include <sys/disk.h>
#include <machine/bus_memio.h>
diff --git a/sys/dev/mlx/mlxvar.h b/sys/dev/mlx/mlxvar.h
index e8924ef..d2e66d9 100644
--- a/sys/dev/mlx/mlxvar.h
+++ b/sys/dev/mlx/mlxvar.h
@@ -228,7 +228,6 @@ struct mlxd_softc
struct mlx_softc *mlxd_controller;
struct mlx_sysdrive *mlxd_drive;
struct disk mlxd_disk;
- struct devstat mlxd_stats;
int mlxd_unit;
int mlxd_flags;
#define MLXD_OPEN (1<<0) /* drive is open (can't shut down) */
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c
index 9a0edc4..cdf1943 100644
--- a/sys/dev/mly/mly.c
+++ b/sys/dev/mly/mly.c
@@ -34,7 +34,6 @@
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/ctype.h>
-#include <sys/devicestat.h>
#include <sys/ioccom.h>
#include <sys/stat.h>
diff --git a/sys/dev/ofw/ofw_disk.c b/sys/dev/ofw/ofw_disk.c
index 94695bd..0a3bfc1 100644
--- a/sys/dev/ofw/ofw_disk.c
+++ b/sys/dev/ofw/ofw_disk.c
@@ -130,7 +130,7 @@ ofwd_strategy(struct bio *bp)
biofinish(bp, NULL, EIO); /* XXX: probably not an error */
return;
}
- biofinish(bp, NULL, 0);
+ biodone(bp);
return;
}
diff --git a/sys/dev/ppbus/vpo.c b/sys/dev/ppbus/vpo.c
index ad83e2f..e76d14b 100644
--- a/sys/dev/ppbus/vpo.c
+++ b/sys/dev/ppbus/vpo.c
@@ -31,8 +31,6 @@
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/malloc.h>
-#include <sys/devicestat.h> /* for struct devstat */
-
#include <cam/cam.h>
#include <cam/cam_ccb.h>
diff --git a/sys/dev/pst/pst-raid.c b/sys/dev/pst/pst-raid.c
index 1bd7a95..9e02aac 100644
--- a/sys/dev/pst/pst-raid.c
+++ b/sys/dev/pst/pst-raid.c
@@ -36,7 +36,6 @@
#include <sys/bio.h>
#include <sys/conf.h>
#include <sys/disk.h>
-#include <sys/devicestat.h>
#include <sys/eventhandler.h>
#include <sys/malloc.h>
#include <sys/lock.h>
@@ -56,7 +55,6 @@ struct pst_softc {
struct iop_softc *iop;
struct i2o_lct_entry *lct;
struct i2o_bsa_device *info;
- struct devstat stats;
struct disk disk;
struct bio_queue_head queue;
struct mtx mtx;
@@ -164,11 +162,6 @@ pst_attach(device_t dev)
psc->disk.d_fwsectors = 63;
psc->disk.d_fwheads = 255;
- devstat_add_entry(&psc->stats, "pst", lun, psc->info->block_size,
- DEVSTAT_NO_ORDERED_TAGS,
- DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_IDE,
- DEVSTAT_PRIORITY_DISK);
-
printf("pst%d: %lluMB <%.40s> [%lld/%d/%d] on %.16s\n", lun,
(unsigned long long)psc->info->capacity / (1024 * 1024),
name, psc->info->capacity/(512*255*63), 255, 63,
@@ -238,9 +231,8 @@ pst_start(struct pst_softc *psc)
request->timeout_handle =
timeout((timeout_t*)pst_timeout, request, 10 * hz);
bioq_remove(&psc->queue, bp);
- devstat_start_transaction(&psc->stats);
if (pst_rw(request)) {
- biofinish(request->bp, &psc->stats, EIO);
+ biofinish(request->bp, NULL, EIO);
iop_free_mfa(request->psc->iop, request->mfa);
psc->outstanding--;
free(request, M_PSTRAID);
@@ -258,7 +250,7 @@ pst_done(struct iop_softc *sc, u_int32_t mfa, struct i2o_single_reply *reply)
untimeout((timeout_t *)pst_timeout, request, request->timeout_handle);
request->bp->bio_resid = request->bp->bio_bcount - reply->donecount;
- biofinish(request->bp, &psc->stats, reply->status ? EIO : 0);
+ biofinish(request->bp, NULL, reply->status ? EIO : 0);
free(request, M_PSTRAID);
mtx_lock(&psc->mtx);
psc->iop->reg->oqueue = mfa;
@@ -276,7 +268,7 @@ pst_timeout(struct pst_request *request)
iop_free_mfa(request->psc->iop, request->mfa);
if ((request->mfa = iop_get_mfa(request->psc->iop)) == 0xffffffff) {
printf("pst: timeout no mfa possible\n");
- biofinish(request->bp, &request->psc->stats, EIO);
+ biofinish(request->bp, NULL, EIO);
request->psc->outstanding--;
mtx_unlock(&request->psc->mtx);
return;
@@ -288,7 +280,7 @@ pst_timeout(struct pst_request *request)
timeout((timeout_t*)pst_timeout, request, 10 * hz);
if (pst_rw(request)) {
iop_free_mfa(request->psc->iop, request->mfa);
- biofinish(request->bp, &request->psc->stats, EIO);
+ biofinish(request->bp, NULL, EIO);
request->psc->outstanding--;
}
mtx_unlock(&request->psc->mtx);
diff --git a/sys/dev/raidframe/rf_freebsdkintf.c b/sys/dev/raidframe/rf_freebsdkintf.c
index 6e1f407..98374c9 100644
--- a/sys/dev/raidframe/rf_freebsdkintf.c
+++ b/sys/dev/raidframe/rf_freebsdkintf.c
@@ -161,7 +161,6 @@
#include <sys/lock.h>
#include <sys/reboot.h>
#include <sys/module.h>
-#include <sys/devicestat.h>
#include <vm/uma.h>
#include "opt_raid.h"
@@ -257,7 +256,6 @@ struct raid_softc {
uma_zone_t sc_cbufpool; /* component buffer pool */
RF_Raid_t *raidPtr; /* Raid information struct */
struct bio_queue_head bio_queue; /* used for the device queue */
- struct devstat device_stats; /* devstat gathering */
};
/* sc_flags */
#define RAIDF_OPEN 0x01 /* unit has been initialized */
@@ -601,8 +599,6 @@ out:
retcode = rf_Shutdown(sc->raidPtr);
RF_THREADGROUP_WAIT_STOP(&sc->raidPtr->engine_tg);
- devstat_remove_entry(&sc->device_stats);
-
disk_destroy(&sc->sc_disk);
raidunlock(sc);
@@ -1290,11 +1286,6 @@ raidinit(raidPtr)
disk_create(raidPtr->raidid, &sc->sc_disk, 0, NULL, NULL);
raidPtr->sc = sc;
- /* Register with devstat */
- devstat_add_entry(&sc->device_stats, "raid", raidPtr->raidid, 0,
- DEVSTAT_NO_BLOCKSIZE | DEVSTAT_NO_ORDERED_TAGS,
- DEVSTAT_TYPE_IF_OTHER, DEVSTAT_PRIORITY_ARRAY);
-
return (sc);
}
@@ -1435,8 +1426,6 @@ raidstart(raidPtr)
*/
do_async = 1;
- devstat_start_transaction(&sc->device_stats);
-
/* XXX we're still at splbio() here... do we *really*
need to be? */
@@ -3040,8 +3029,6 @@ rf_disk_unbusy(desc)
sc = desc->raidPtr->sc;
bp = (struct bio *)desc->bp;
-
- devstat_end_transaction_bio(&sc->device_stats, bp);
}
/*
diff --git a/sys/dev/twe/twe_compat.h b/sys/dev/twe/twe_compat.h
index 3d10434..7d2f9c7 100644
--- a/sys/dev/twe/twe_compat.h
+++ b/sys/dev/twe/twe_compat.h
@@ -171,8 +171,8 @@ typedef struct bio_queue_head twe_bioq;
# define TWE_BIO_HAS_ERROR(bp) ((bp)->bio_flags & BIO_ERROR)
# define TWE_BIO_RESID(bp) (bp)->bio_resid
# define TWE_BIO_DONE(bp) biodone(bp)
-# define TWE_BIO_STATS_START(bp) devstat_start_transaction(&((struct twed_softc *)TWE_BIO_SOFTC(bp))->twed_stats)
-# define TWE_BIO_STATS_END(bp) devstat_end_transaction_bio(&((struct twed_softc *)TWE_BIO_SOFTC(bp))->twed_stats, bp)
+# define TWE_BIO_STATS_START(bp)
+# define TWE_BIO_STATS_END(bp)
#endif
#endif /* FreeBSD */
diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c
index a0b6db7..10d7006 100644
--- a/sys/dev/twe/twe_freebsd.c
+++ b/sys/dev/twe/twe_freebsd.c
@@ -44,8 +44,6 @@
#include <dev/twe/twevar.h>
#include <dev/twe/twe_tables.h>
-#include <sys/devicestat.h>
-
static devclass_t twe_devclass;
#ifdef TWE_DEBUG
@@ -539,7 +537,6 @@ struct twed_softc
struct twe_softc *twed_controller; /* parent device softc */
struct twe_drive *twed_drive; /* drive data in parent softc */
struct disk twed_disk; /* generic disk handle */
- struct devstat twed_stats; /* accounting */
};
/*
@@ -705,11 +702,6 @@ twed_attach(device_t dev)
sc->twed_drive->td_size / ((1024 * 1024) / TWE_BLOCK_SIZE),
sc->twed_drive->td_size);
- devstat_add_entry(&sc->twed_stats, "twed", device_get_unit(dev), TWE_BLOCK_SIZE,
- DEVSTAT_NO_ORDERED_TAGS,
- DEVSTAT_TYPE_STORARRAY | DEVSTAT_TYPE_IF_OTHER,
- DEVSTAT_PRIORITY_ARRAY);
-
/* attach a generic disk device to ourselves */
sc->twed_disk.d_open = twed_open;
@@ -746,7 +738,6 @@ twed_detach(device_t dev)
if (sc->twed_disk.d_flags & DISKFLAG_OPEN)
return(EBUSY);
- devstat_remove_entry(&sc->twed_stats);
#ifdef FREEBSD_4
if (--disks_registered == 0)
cdevsw_remove(&tweddisk_cdevsw);
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index afadc87..38ec093 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -118,7 +118,6 @@
#include <cam/scsi/scsi_all.h>
#include <cam/scsi/scsi_da.h>
-#include <sys/devicestat.h>
#include <cam/cam_periph.h>
#ifdef USB_DEBUG
diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c
index 81d7a46..96065dc 100644
--- a/sys/dev/vinum/vinum.c
+++ b/sys/dev/vinum/vinum.c
@@ -43,7 +43,6 @@
#include <dev/vinum/vinumhdr.h>
#include <sys/sysproto.h> /* for sync(2) */
-#include <sys/devicestat.h>
#ifdef VINUMDEBUG
#include <sys/reboot.h>
int debug = 0;
OpenPOWER on IntegriCloud