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
--- 18 unchanged lines hidden (view full) ---
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * $FreeBSD: head/sys/geom/geom.h 237518 2012-06-24 04:29:03Z ken $
36 */
37
38#ifndef _GEOM_GEOM_H_
39#define _GEOM_GEOM_H_
40
41#include <sys/lock.h>
42#include <sys/mutex.h>
43#include <sys/sx.h>
--- 27 unchanged lines hidden (view full) ---
71#define G_TF_TRANSPARENT 2
72typedef int g_access_t (struct g_provider *, int, int, int);
73/* XXX: not sure about the thread arg */
74typedef void g_orphan_t (struct g_consumer *);
75
76typedef void g_start_t (struct bio *);
77typedef void g_spoiled_t (struct g_consumer *);
78typedef void g_attrchanged_t (struct g_consumer *, const char *attr);
79typedef void g_provgone_t (struct g_provider *);
80typedef void g_dumpconf_t (struct sbuf *, const char *indent, struct g_geom *,
81 struct g_consumer *, struct g_provider *);
82
83/*
84 * The g_class structure describes a transformation class. In other words
85 * all BSD disklabel handlers share one g_class, all MBR handlers share
86 * one common g_class and so on.
87 * Certain operations are instantiated on the class, most notably the
--- 10 unchanged lines hidden (view full) ---
98 g_fini_t *fini;
99 g_ctl_destroy_geom_t *destroy_geom;
100 /*
101 * Default values for geom methods
102 */
103 g_start_t *start;
104 g_spoiled_t *spoiled;
105 g_attrchanged_t *attrchanged;
106 g_provgone_t *providergone;
107 g_dumpconf_t *dumpconf;
108 g_access_t *access;
109 g_orphan_t *orphan;
110 g_ioctl_t *ioctl;
111 void *spare1;
112 void *spare2;
113 /*
114 * The remaining elements are private
--- 15 unchanged lines hidden (view full) ---
130 LIST_ENTRY(g_geom) geom;
131 LIST_HEAD(,g_consumer) consumer;
132 LIST_HEAD(,g_provider) provider;
133 TAILQ_ENTRY(g_geom) geoms; /* XXX: better name */
134 int rank;
135 g_start_t *start;
136 g_spoiled_t *spoiled;
137 g_attrchanged_t *attrchanged;
138 g_provgone_t *providergone;
139 g_dumpconf_t *dumpconf;
140 g_access_t *access;
141 g_orphan_t *orphan;
142 g_ioctl_t *ioctl;
143 void *spare0;
144 void *spare1;
145 void *softc;
146 unsigned flags;
--- 253 unchanged lines hidden ---
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
--- 18 unchanged lines hidden (view full) ---
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * $FreeBSD: head/sys/geom/geom.h 237518 2012-06-24 04:29:03Z ken $
36 */
37
38#ifndef _GEOM_GEOM_H_
39#define _GEOM_GEOM_H_
40
41#include <sys/lock.h>
42#include <sys/mutex.h>
43#include <sys/sx.h>
--- 27 unchanged lines hidden (view full) ---
71#define G_TF_TRANSPARENT 2
72typedef int g_access_t (struct g_provider *, int, int, int);
73/* XXX: not sure about the thread arg */
74typedef void g_orphan_t (struct g_consumer *);
75
76typedef void g_start_t (struct bio *);
77typedef void g_spoiled_t (struct g_consumer *);
78typedef void g_attrchanged_t (struct g_consumer *, const char *attr);
79typedef void g_provgone_t (struct g_provider *);
80typedef void g_dumpconf_t (struct sbuf *, const char *indent, struct g_geom *,
81 struct g_consumer *, struct g_provider *);
82
83/*
84 * The g_class structure describes a transformation class. In other words
85 * all BSD disklabel handlers share one g_class, all MBR handlers share
86 * one common g_class and so on.
87 * Certain operations are instantiated on the class, most notably the
--- 10 unchanged lines hidden (view full) ---
98 g_fini_t *fini;
99 g_ctl_destroy_geom_t *destroy_geom;
100 /*
101 * Default values for geom methods
102 */
103 g_start_t *start;
104 g_spoiled_t *spoiled;
105 g_attrchanged_t *attrchanged;
106 g_provgone_t *providergone;
107 g_dumpconf_t *dumpconf;
108 g_access_t *access;
109 g_orphan_t *orphan;
110 g_ioctl_t *ioctl;
111 void *spare1;
112 void *spare2;
113 /*
114 * The remaining elements are private
--- 15 unchanged lines hidden (view full) ---
130 LIST_ENTRY(g_geom) geom;
131 LIST_HEAD(,g_consumer) consumer;
132 LIST_HEAD(,g_provider) provider;
133 TAILQ_ENTRY(g_geom) geoms; /* XXX: better name */
134 int rank;
135 g_start_t *start;
136 g_spoiled_t *spoiled;
137 g_attrchanged_t *attrchanged;
138 g_provgone_t *providergone;
139 g_dumpconf_t *dumpconf;
140 g_access_t *access;
141 g_orphan_t *orphan;
142 g_ioctl_t *ioctl;
143 void *spare0;
144 void *spare1;
145 void *softc;
146 unsigned flags;
--- 253 unchanged lines hidden ---