summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 4e5e3ba504a..d39c97b8971 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.89 2009/06/03 03:14:28 thib Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.90 2009/06/03 06:25:27 marco Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -77,6 +77,9 @@ int disk_change; /* set if a disk has been attached/detached
* is reset by hw_sysctl()
*/
+/* softraid callback, do not use! */
+void (*softraid_disk_attach)(struct disk *, int);
+
/*
* Seek sort for disks. We depend on the driver which calls us using b_resid
* as the current cylinder number.
@@ -796,6 +799,9 @@ disk_attach(struct disk *diskp)
TAILQ_INSERT_TAIL(&disklist, diskp, dk_link);
++disk_count;
disk_change = 1;
+
+ if (softraid_disk_attach)
+ softraid_disk_attach(diskp, 1);
}
/*
@@ -805,6 +811,9 @@ void
disk_detach(struct disk *diskp)
{
+ if (softraid_disk_attach)
+ softraid_disk_attach(diskp, -1);
+
/*
* Free the space used by the disklabel structures.
*/