Index: geom_vinum_drive.c =================================================================== --- geom_vinum_drive.c (revision 187036) +++ geom_vinum_drive.c (working copy) @@ -30,7 +30,9 @@ #include #include #include +#if __FreeBSD_version >= 800044 #include +#endif #include #include Index: geom_vinum.c =================================================================== --- geom_vinum.c (revision 187036) +++ geom_vinum.c (working copy) @@ -134,6 +134,10 @@ error = ENXIO; gp = pp->geom; sc = gp->softc; + if (dw > 0 && dr == 0) + dr = 1; + else if (dw < 0 && dr == 0) + dr = -1; LIST_FOREACH(d, &sc->drives, drive) { if (d->consumer == NULL) continue; @@ -177,7 +181,11 @@ TAILQ_INIT(&sc->equeue); mtx_init(&sc->config_mtx, "gv_config", NULL, MTX_DEF); mtx_init(&sc->queue_mtx, "gv_queue", NULL, MTX_DEF); +#if __FreeBSD_version >= 800002 kproc_create(gv_worker, sc, NULL, 0, 0, "gv_worker"); +#else + kthread_create(gv_worker, sc, NULL, 0, 0, "gv_worker"); +#endif } static int @@ -961,7 +969,11 @@ mtx_destroy(&sc->queue_mtx); g_free(sc->bqueue); g_free(sc); +#if __FreeBSD_version >= 800002 kproc_exit(ENXIO); +#else + kthread_exit(ENXIO); +#endif break; /* not reached */ default: Index: geom_vinum_create.c =================================================================== --- geom_vinum_create.c (revision 187036) +++ geom_vinum_create.c (working copy) @@ -32,6 +32,9 @@ #include #include #include +#if __FreeBSD_version >= 800044 +#include +#endif #include #include @@ -152,7 +155,13 @@ hdr = g_malloc(sizeof(*hdr), M_WAITOK | M_ZERO); hdr->magic = GV_MAGIC; hdr->config_length = GV_CFG_LEN; + mtx_lock(&hostname_mtx); +#if __FreeBSD_version >= 800044 + bcopy(G_hostname, hdr->label.sysname, GV_HOSTNAME_LEN); +#else bcopy(hostname, hdr->label.sysname, GV_HOSTNAME_LEN); +#endif + mtx_unlock(&hostname_mtx); strlcpy(hdr->label.name, d->name, sizeof(hdr->label.name)); microtime(&hdr->label.date_of_birth); d->hdr = hdr;