1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 2002 Poul-Henning Kamp 5 * Copyright (c) 2002 Networks Associates Technology, Inc. 6 * All rights reserved. 7 * 8 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 9 * and NAI Labs, the Security Research Division of Network Associates, Inc. 10 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the 11 * DARPA CHATS research program. 12 * 13 * Redistribution and use in source and binary forms, with or without 14 * modification, are permitted provided that the following conditions 15 * are met: 16 * 1. Redistributions of source code must retain the above copyright 17 * notice, this list of conditions and the following disclaimer. 18 * 2. Redistributions in binary form must reproduce the above copyright 19 * notice, this list of conditions and the following disclaimer in the 20 * documentation and/or other materials provided with the distribution. 21 * 3. The names of the authors may not be used to endorse or promote 22 * products derived from this software without specific prior written 23 * permission. 24 * 25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * $FreeBSD$ 38 */ 39 40 LIST_HEAD(class_list_head, g_class); 41 TAILQ_HEAD(g_tailq_head, g_geom); 42 43 extern int g_collectstats; 44 #define G_STATS_PROVIDERS 1 /* Collect I/O stats for providers */ 45 #define G_STATS_CONSUMERS 2 /* Collect I/O stats for consumers */ 46 47 extern int g_debugflags; 48 /* 49 * 1 G_T_TOPOLOGY 50 * 2 G_T_BIO 51 * 4 G_T_ACCESS 52 * 8 (unused) 53 * 16 Allow footshooting on rank#1 providers 54 * 32 G_T_DETAILS 55 */ 56 #define G_F_DISKIOCTL 64 57 #define G_F_CTLDUMP 128 58 59 /* geom_dump.c */ 60 void g_confxml(void *, int flag); 61 void g_conf_specific(struct sbuf *sb, struct g_class *mp, struct g_geom *gp, struct g_provider *pp, struct g_consumer *cp); 62 void g_conf_printf_escaped(struct sbuf *sb, const char *fmt, ...); 63 void g_confdot(void *, int flag); 64 void g_conftxt(void *, int flag); 65 66 /* geom_event.c */ 67 void g_event_init(void); 68 void g_run_events(void); 69 void g_do_wither(void); 70 71 /* geom_subr.c */ 72 extern struct class_list_head g_classes; 73 extern char *g_wait_event, *g_wait_sim, *g_wait_up, *g_wait_down; 74 void g_wither_washer(void); 75 76 /* geom_io.c */ 77 void g_io_init(void); 78 void g_io_schedule_down(struct thread *tp); 79 void g_io_schedule_up(struct thread *tp); 80 81 /* geom_kern.c / geom_kernsim.c */ 82 void g_init(void); 83 extern int g_shutdown; 84 extern int g_notaste; 85 86 /* geom_ctl.c */ 87 void g_ctl_init(void); 88