From 60794e0478b835c275eccb116cd177a789f87f56 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 8 Mar 2003 08:01:31 +0000 Subject: Centralize the devstat handling for all GEOM disk device drivers in geom_disk.c. As a side effect this makes a lot of #include lines not needed and some biofinish() calls can be reduced to biodone() again. --- sys/dev/mlx/mlx.c | 1 - sys/dev/mlx/mlx_compat.h | 4 ++-- sys/dev/mlx/mlx_disk.c | 7 ------- sys/dev/mlx/mlx_pci.c | 1 - sys/dev/mlx/mlxvar.h | 1 - 5 files changed, 2 insertions(+), 12 deletions(-) (limited to 'sys/dev/mlx') diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index df8c03d8a92a..d8841de676ca 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -37,7 +37,6 @@ #include #include -#include #include #include diff --git a/sys/dev/mlx/mlx_compat.h b/sys/dev/mlx/mlx_compat.h index aa69ba60f8ab..7160c3d1639b 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 f660924883c5..0b8664fdee9c 100644 --- a/sys/dev/mlx/mlx_disk.c +++ b/sys/dev/mlx/mlx_disk.c @@ -37,7 +37,6 @@ #include #include -#include #include #include @@ -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 741c68209415..4a2124698805 100644 --- a/sys/dev/mlx/mlx_pci.c +++ b/sys/dev/mlx/mlx_pci.c @@ -32,7 +32,6 @@ #include #include -#include #include #include diff --git a/sys/dev/mlx/mlxvar.h b/sys/dev/mlx/mlxvar.h index e8924ef1e6de..d2e66d9b8d17 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) */ -- cgit v1.3