geom.h (110518) | geom.h (110523) |
---|---|
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 110518 2003-02-07 21:43:34Z phk $ | 35 * $FreeBSD: head/sys/geom/geom.h 110523 2003-02-07 23:08:24Z 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> --- 102 unchanged lines hidden (view full) --- 146 struct bintime it; 147 struct bintime wentidle; 148 struct { 149 uint64_t nop; 150 uint64_t nbyte; 151 uint64_t nmem; 152 uint64_t nerr; 153 struct bintime dt; | 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> --- 102 unchanged lines hidden (view full) --- 146 struct bintime it; 147 struct bintime wentidle; 148 struct { 149 uint64_t nop; 150 uint64_t nbyte; 151 uint64_t nmem; 152 uint64_t nerr; 153 struct bintime dt; |
154 } ops[5]; | 154 } ops[3]; |
155#define G_STAT_IDX_READ 0 | 155#define G_STAT_IDX_READ 0 |
156#define G_STAT_IDX_WRITE 2 157#define G_STAT_IDX_DELETE 3 158#define G_STAT_IDX_GETATTR 4 159#define G_STAT_IDX_SETATTR 5 | 156#define G_STAT_IDX_WRITE 1 157#define G_STAT_IDX_DELETE 2 |
160}; 161 162/* 163 * A g_consumer is an attachment point for a g_provider. One g_consumer 164 * can only be attached to one g_provider, but multiple g_consumers 165 * can be attached to one g_provider. 166 */ 167 168struct g_consumer { 169 u_int protect; 170 struct g_geom *geom; 171 LIST_ENTRY(g_consumer) consumer; 172 struct g_provider *provider; 173 LIST_ENTRY(g_consumer) consumers; /* XXX: better name */ 174 int acr, acw, ace; 175 struct g_event *event; | 158}; 159 160/* 161 * A g_consumer is an attachment point for a g_provider. One g_consumer 162 * can only be attached to one g_provider, but multiple g_consumers 163 * can be attached to one g_provider. 164 */ 165 166struct g_consumer { 167 u_int protect; 168 struct g_geom *geom; 169 LIST_ENTRY(g_consumer) consumer; 170 struct g_provider *provider; 171 LIST_ENTRY(g_consumer) consumers; /* XXX: better name */ 172 int acr, acw, ace; 173 struct g_event *event; |
176 177 int biocount; | |
178 int spoiled; 179 struct g_stat stat; 180}; 181 182/* 183 * A g_provider is a "logical disk". 184 */ 185struct g_provider { --- 270 unchanged lines hidden --- | 174 int spoiled; 175 struct g_stat stat; 176}; 177 178/* 179 * A g_provider is a "logical disk". 180 */ 181struct g_provider { --- 270 unchanged lines hidden --- |