geom_int.h (8c24ef5f78da8b005d6aa497eb822be3a0ea0e22) | geom_int.h (b1876192f015b1cf392b52b82b124265fc9683a7) |
---|---|
1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 23 unchanged lines hidden (view full) --- 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * $FreeBSD$ 36 */ 37 38LIST_HEAD(class_list_head, g_class); 39TAILQ_HEAD(g_tailq_head, g_geom); | 1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 23 unchanged lines hidden (view full) --- 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * $FreeBSD$ 36 */ 37 38LIST_HEAD(class_list_head, g_class); 39TAILQ_HEAD(g_tailq_head, g_geom); |
40TAILQ_HEAD(event_tailq_head, g_event); |
|
40 | 41 |
41extern int g_collectstats; | 42extern struct g_tailq_head geoms; 43extern struct event_tailq_head events; |
42extern int g_debugflags; | 44extern int g_debugflags; |
45 |
|
43/* | 46/* |
44 * 1 G_T_TOPOLOGY 45 * 2 G_T_BIO 46 * 4 G_T_ACCESS 47 * 8 (unused) 48 * 16 Allow footshooting on rank#1 providers 49 * 32 G_T_DETAILS | 47 * Various internal actions are tracked by tagging g_event[s] onto 48 * an internal eventqueue. |
50 */ | 49 */ |
51#define G_F_DISKIOCTL 64 52#define G_F_CTLDUMP 128 | 50enum g_events { 51 EV_NEW_CLASS, /* class */ 52 EV_NEW_PROVIDER, /* provider */ 53 EV_SPOILED, /* provider, consumer */ 54 EV_LAST 55}; |
53 | 56 |
57struct g_event { 58 enum g_events event; 59 TAILQ_ENTRY(g_event) events; 60 struct g_class *class; 61 struct g_geom *geom; 62 struct g_provider *provider; 63 struct g_consumer *consumer; 64}; 65 |
|
54/* geom_dump.c */ | 66/* geom_dump.c */ |
55void g_confxml(void *, int flag); 56void g_conf_specific(struct sbuf *sb, struct g_class *mp, struct g_geom *gp, struct g_provider *pp, struct g_consumer *cp); 57void g_confdot(void *, int flag); 58void g_conftxt(void *, int flag); | 67struct sbuf * g_conf(void); 68struct sbuf * g_conf_specific(struct g_class *mp, struct g_geom *gp, struct g_provider *pp, struct g_consumer *cp); 69struct sbuf * g_confdot(void); |
59 | 70 |
71 |
|
60/* geom_event.c */ 61void g_event_init(void); | 72/* geom_event.c */ 73void g_event_init(void); |
74void g_post_event(enum g_events ev, struct g_class *mp, struct g_geom *gp, struct g_provider *pp, struct g_consumer *cp); |
|
62void g_run_events(void); | 75void g_run_events(void); |
63void g_do_wither(void); | |
64 65/* geom_subr.c */ | 76 77/* geom_subr.c */ |
66extern struct class_list_head g_classes; | 78extern struct class_list_head g_classs; |
67extern char *g_wait_event, *g_wait_sim, *g_wait_up, *g_wait_down; | 79extern char *g_wait_event, *g_wait_sim, *g_wait_up, *g_wait_down; |
68int g_wither_washer(void); | |
69 70/* geom_io.c */ 71void g_io_init(void); 72void g_io_schedule_down(struct thread *tp); 73void g_io_schedule_up(struct thread *tp); 74 75/* geom_kern.c / geom_kernsim.c */ 76void g_init(void); | 80 81/* geom_io.c */ 82void g_io_init(void); 83void g_io_schedule_down(struct thread *tp); 84void g_io_schedule_up(struct thread *tp); 85 86/* geom_kern.c / geom_kernsim.c */ 87void g_init(void); |
77extern int g_shutdown; 78 79/* geom_ctl.c */ 80void g_ctl_init(void); | |