summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-03-08 08:01:31 +0000
committerphk <phk@FreeBSD.org>2003-03-08 08:01:31 +0000
commite01fc931cfd9bda87619e5079027111673291cd0 (patch)
tree040efa2f46ce483cf5b045724c67c81b1d43d147 /sys/dev/mlx
parenta7246ed45b4e70820cc609b9abd0dc340fd24782 (diff)
downloadFreeBSD-src-e01fc931cfd9bda87619e5079027111673291cd0.zip
FreeBSD-src-e01fc931cfd9bda87619e5079027111673291cd0.tar.gz
Centralize the devstat handling for all GEOM disk device drivers
in geom_disk.c. As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again.
Diffstat (limited to 'sys/dev/mlx')
-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
5 files changed, 2 insertions, 12 deletions
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) */
OpenPOWER on IntegriCloud