summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx/mlxvar.h
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2000-04-11 02:52:46 +0000
committermsmith <msmith@FreeBSD.org>2000-04-11 02:52:46 +0000
commit612fc8c5158ae5c2f3017445553eefe095fbbfc1 (patch)
treef329a647fd19231f32b45be5d1325231c626e853 /sys/dev/mlx/mlxvar.h
parent1f9a3b6ffeeb06ce3881cbb6016adb4f15ef9d81 (diff)
downloadFreeBSD-src-612fc8c5158ae5c2f3017445553eefe095fbbfc1.zip
FreeBSD-src-612fc8c5158ae5c2f3017445553eefe095fbbfc1.tar.gz
Add features required for basic userland management utility:
- implement user-initiated background drive rebuild - implement user-initiated background consistency check - log controller-initiated background rebuild/check operations Try to fix the elusive "invalid log operation" bug, and panic if we do hit this one in the hopes of getting better information. Tidy up diagnostic messages. Try to use disk_create/disk_destroy correctly. This isn't working properly yet, but it's not clear whose fault that is.
Diffstat (limited to 'sys/dev/mlx/mlxvar.h')
-rw-r--r--sys/dev/mlx/mlxvar.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/mlx/mlxvar.h b/sys/dev/mlx/mlxvar.h
index 7847ca2..cd0cd90 100644
--- a/sys/dev/mlx/mlxvar.h
+++ b/sys/dev/mlx/mlxvar.h
@@ -148,11 +148,13 @@ struct mlx_softc
#define MLX_STATE_SUSPEND (1<<3) /* controller is suspended */
struct callout_handle mlx_timeout; /* periodic status monitor */
time_t mlx_lastpoll; /* last time_second we polled for status */
- int mlx_lastevent; /* sequence number of the last event we recorded */
+ u_int16_t mlx_lastevent; /* sequence number of the last event we recorded */
int mlx_currevent; /* sequence number last time we looked */
- int mlx_rebuild; /* if >= 0, drive is being rebuilt */
- u_int32_t mlx_rebuildstat;/* blocks left to rebuild if active */
- int mlx_check; /* if >= 0, drive is being checked */
+ int mlx_background; /* if != 0 rebuild or check is in progress */
+#define MLX_BACKGROUND_CHECK 1 /* we started a check */
+#define MLX_BACKGROUND_REBUILD 2 /* we started a rebuild */
+#define MLX_BACKGROUND_SPONTANEOUS 3 /* it just happened somehow */
+ struct mlx_rebuild_status mlx_rebuildstat; /* last rebuild status */
struct mlx_pause mlx_pause; /* pending pause operation details */
int mlx_locks; /* reentrancy avoidance */
@@ -213,6 +215,7 @@ extern d_close_t mlx_close;
extern d_ioctl_t mlx_ioctl;
extern devclass_t mlx_devclass;
+extern devclass_t mlxd_devclass;
/*
* Mylex System Disk driver
@@ -220,6 +223,7 @@ extern devclass_t mlx_devclass;
struct mlxd_softc
{
device_t mlxd_dev;
+ dev_t mlxd_dev_t;
struct mlx_softc *mlxd_controller;
struct mlx_sysdrive *mlxd_drive;
struct disk mlxd_disk;
OpenPOWER on IntegriCloud