geom_vinum_subr.c (135164) | geom_vinum_subr.c (135173) |
---|---|
1/*- 2 * Copyright (c) 2004 Lukas Ertl 3 * Copyright (c) 1997, 1998, 1999 4 * Nan Yang Computer Services Limited. All rights reserved. 5 * 6 * Parts written by Greg Lehey 7 * 8 * This software is distributed under the so-called ``Berkeley --- 25 unchanged lines hidden (view full) --- 34 * interruption) however caused and on any theory of liability, whether 35 * in contract, strict liability, or tort (including negligence or 36 * otherwise) arising in any way out of the use of this software, even if 37 * advised of the possibility of such damage. 38 * 39 */ 40 41#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 Lukas Ertl 3 * Copyright (c) 1997, 1998, 1999 4 * Nan Yang Computer Services Limited. All rights reserved. 5 * 6 * Parts written by Greg Lehey 7 * 8 * This software is distributed under the so-called ``Berkeley --- 25 unchanged lines hidden (view full) --- 34 * interruption) however caused and on any theory of liability, whether 35 * in contract, strict liability, or tort (including negligence or 36 * otherwise) arising in any way out of the use of this software, even if 37 * advised of the possibility of such damage. 38 * 39 */ 40 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/sys/geom/vinum/geom_vinum_subr.c 135164 2004-09-13 17:44:47Z le $"); | 42__FBSDID("$FreeBSD: head/sys/geom/vinum/geom_vinum_subr.c 135173 2004-09-13 21:01:36Z le $"); |
43 44#include <sys/param.h> 45#include <sys/conf.h> 46#include <sys/kernel.h> 47#include <sys/libkern.h> 48#include <sys/malloc.h> 49#include <sys/systm.h> 50 --- 761 unchanged lines hidden (view full) --- 812 if (!strncmp(d->name, name, GV_MAXDRIVENAME)) 813 return (GV_TYPE_DRIVE); 814 } 815 816 return (-1); 817} 818 819void | 43 44#include <sys/param.h> 45#include <sys/conf.h> 46#include <sys/kernel.h> 47#include <sys/libkern.h> 48#include <sys/malloc.h> 49#include <sys/systm.h> 50 --- 761 unchanged lines hidden (view full) --- 812 if (!strncmp(d->name, name, GV_MAXDRIVENAME)) 813 return (GV_TYPE_DRIVE); 814 } 815 816 return (-1); 817} 818 819void |
820gv_kill_drive_thread(struct gv_drive *d) 821{ 822 if (d->flags & GV_DRIVE_THREAD_ACTIVE) { 823 d->flags |= GV_DRIVE_THREAD_DIE; 824 wakeup(d); 825 while (!(d->flags & GV_DRIVE_THREAD_DEAD)) 826 tsleep(d, PRIBIO, "gv_die", hz); 827 d->flags &= ~GV_DRIVE_THREAD_ACTIVE; 828 mtx_destroy(&d->bqueue_mtx); 829 } 830} 831 832void |
|
820gv_kill_plex_thread(struct gv_plex *p) 821{ 822 if ((p->org == GV_PLEX_RAID5) && (p->flags & GV_PLEX_THREAD_ACTIVE)) { 823 p->flags |= GV_PLEX_THREAD_DIE; 824 wakeup(p); 825 while (!(p->flags & GV_PLEX_THREAD_DEAD)) 826 tsleep(p, PRIBIO, "gv_die", hz); 827 p->flags &= ~GV_PLEX_THREAD_ACTIVE; 828 mtx_destroy(&p->worklist_mtx); 829 } 830} | 833gv_kill_plex_thread(struct gv_plex *p) 834{ 835 if ((p->org == GV_PLEX_RAID5) && (p->flags & GV_PLEX_THREAD_ACTIVE)) { 836 p->flags |= GV_PLEX_THREAD_DIE; 837 wakeup(p); 838 while (!(p->flags & GV_PLEX_THREAD_DEAD)) 839 tsleep(p, PRIBIO, "gv_die", hz); 840 p->flags &= ~GV_PLEX_THREAD_ACTIVE; 841 mtx_destroy(&p->worklist_mtx); 842 } 843} |