geom.h (119593) | geom.h (119660) |
---|---|
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 * | 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 119593 2003-08-30 18:33:55Z phk $ | 35 * $FreeBSD: head/sys/geom/geom.h 119660 2003-09-01 20:45:32Z phk $ |
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> --- 15 unchanged lines hidden (view full) --- 59 60typedef int g_config_t (struct g_configargs *ca); 61typedef void g_ctl_req_t (struct gctl_req *, struct g_class *cp, char const *verb); 62typedef int g_ctl_create_geom_t (struct gctl_req *, struct g_class *cp, struct g_provider *pp); 63typedef int g_ctl_destroy_geom_t (struct gctl_req *, struct g_class *cp, struct g_geom *gp); 64typedef int g_ctl_config_geom_t (struct gctl_req *, struct g_geom *gp, const char *verb); 65typedef void g_init_t (struct g_class *mp); 66typedef void g_fini_t (struct g_class *mp); | 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> --- 15 unchanged lines hidden (view full) --- 59 60typedef int g_config_t (struct g_configargs *ca); 61typedef void g_ctl_req_t (struct gctl_req *, struct g_class *cp, char const *verb); 62typedef int g_ctl_create_geom_t (struct gctl_req *, struct g_class *cp, struct g_provider *pp); 63typedef int g_ctl_destroy_geom_t (struct gctl_req *, struct g_class *cp, struct g_geom *gp); 64typedef int g_ctl_config_geom_t (struct gctl_req *, struct g_geom *gp, const char *verb); 65typedef void g_init_t (struct g_class *mp); 66typedef void g_fini_t (struct g_class *mp); |
67typedef struct g_geom * g_taste_t (struct g_class *, struct g_provider *, 68 int flags); | 67typedef struct g_geom * g_taste_t (struct g_class *, struct g_provider *, int flags); 68typedef int g_ioctl_t(struct g_provider *pp, u_long cmd, void *data, struct thread *td); |
69#define G_TF_NORMAL 0 70#define G_TF_INSIST 1 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 *); --- 34 unchanged lines hidden (view full) --- 111 LIST_HEAD(,g_provider) provider; 112 TAILQ_ENTRY(g_geom) geoms; /* XXX: better name */ 113 int rank; 114 g_start_t *start; 115 g_spoiled_t *spoiled; 116 g_dumpconf_t *dumpconf; 117 g_access_t *access; 118 g_orphan_t *orphan; | 69#define G_TF_NORMAL 0 70#define G_TF_INSIST 1 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 *); --- 34 unchanged lines hidden (view full) --- 111 LIST_HEAD(,g_provider) provider; 112 TAILQ_ENTRY(g_geom) geoms; /* XXX: better name */ 113 int rank; 114 g_start_t *start; 115 g_spoiled_t *spoiled; 116 g_dumpconf_t *dumpconf; 117 g_access_t *access; 118 g_orphan_t *orphan; |
119 g_ioctl_t *ioctl; |
|
119 void *softc; 120 unsigned flags; 121#define G_GEOM_WITHER 1 122}; 123 124/* 125 * The g_bioq is a queue of struct bio's. 126 * XXX: possibly collection point for statistics. --- 99 unchanged lines hidden (view full) --- 226int g_io_getattr(const char *attr, struct g_consumer *cp, int *len, void *ptr); 227void g_io_request(struct bio *bp, struct g_consumer *cp); 228struct bio *g_new_bio(void); 229void * g_read_data(struct g_consumer *cp, off_t offset, off_t length, int *error); 230int g_write_data(struct g_consumer *cp, off_t offset, void *ptr, off_t length); 231 232/* geom_kern.c / geom_kernsim.c */ 233 | 120 void *softc; 121 unsigned flags; 122#define G_GEOM_WITHER 1 123}; 124 125/* 126 * The g_bioq is a queue of struct bio's. 127 * XXX: possibly collection point for statistics. --- 99 unchanged lines hidden (view full) --- 227int g_io_getattr(const char *attr, struct g_consumer *cp, int *len, void *ptr); 228void g_io_request(struct bio *bp, struct g_consumer *cp); 229struct bio *g_new_bio(void); 230void * g_read_data(struct g_consumer *cp, off_t offset, off_t length, int *error); 231int g_write_data(struct g_consumer *cp, off_t offset, void *ptr, off_t length); 232 233/* geom_kern.c / geom_kernsim.c */ 234 |
234#ifndef _SYS_CONF_H_ 235typedef int d_ioctl_t(dev_t dev, u_long cmd, caddr_t data, 236 int fflag, struct thread *td); 237#endif 238 239struct g_ioctl { 240 u_long cmd; 241 void *data; 242 int fflag; 243 struct thread *td; 244 d_ioctl_t *func; 245 void *dev; 246}; 247 | |
248#ifdef _KERNEL 249 250struct g_kerneldump { 251 off_t offset; 252 off_t length; 253}; 254 255MALLOC_DECLARE(M_GEOM); --- 59 unchanged lines hidden --- | 235#ifdef _KERNEL 236 237struct g_kerneldump { 238 off_t offset; 239 off_t length; 240}; 241 242MALLOC_DECLARE(M_GEOM); --- 59 unchanged lines hidden --- |