geom_io.c (d306122d60b484718888cfbda76b211d3d7767d1) | geom_io.c (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 --- 39 unchanged lines hidden (view full) --- 48#include <sys/systm.h> 49#include <sys/kernel.h> 50#include <sys/malloc.h> 51#include <sys/bio.h> 52#endif 53 54#include <sys/errno.h> 55#include <geom/geom.h> | 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 --- 39 unchanged lines hidden (view full) --- 48#include <sys/systm.h> 49#include <sys/kernel.h> 50#include <sys/malloc.h> 51#include <sys/bio.h> 52#endif 53 54#include <sys/errno.h> 55#include <geom/geom.h> |
56#include <geom/geom_int.h> |
|
56 57static struct g_bioq g_bio_run_down; 58static struct g_bioq g_bio_run_up; 59static struct g_bioq g_bio_idle; 60 61#include <machine/atomic.h> 62 63static void --- 94 unchanged lines hidden (view full) --- 158{ 159 160 g_bioq_init(&g_bio_run_down); 161 g_bioq_init(&g_bio_run_up); 162 g_bioq_init(&g_bio_idle); 163} 164 165int | 57 58static struct g_bioq g_bio_run_down; 59static struct g_bioq g_bio_run_up; 60static struct g_bioq g_bio_idle; 61 62#include <machine/atomic.h> 63 64static void --- 94 unchanged lines hidden (view full) --- 159{ 160 161 g_bioq_init(&g_bio_run_down); 162 g_bioq_init(&g_bio_run_up); 163 g_bioq_init(&g_bio_idle); 164} 165 166int |
166g_io_setattr(char *attr, struct g_consumer *cp, int len, void *ptr, struct thread *tp __unused) | 167g_io_setattr(char *attr, struct g_consumer *cp, int len, void *ptr) |
167{ 168 struct bio *bp; 169 int error; 170 171 g_trace(G_T_BIO, "bio_setattr(%s)", attr); 172 do { 173 bp = g_new_bio(); 174 bp->bio_cmd = BIO_SETATTR; --- 12 unchanged lines hidden (view full) --- 187 if (error == EBUSY) 188 tsleep(&error, 0, "setattr_busy", hz); 189 } while(error == EBUSY); 190 return (error); 191} 192 193 194int | 168{ 169 struct bio *bp; 170 int error; 171 172 g_trace(G_T_BIO, "bio_setattr(%s)", attr); 173 do { 174 bp = g_new_bio(); 175 bp->bio_cmd = BIO_SETATTR; --- 12 unchanged lines hidden (view full) --- 188 if (error == EBUSY) 189 tsleep(&error, 0, "setattr_busy", hz); 190 } while(error == EBUSY); 191 return (error); 192} 193 194 195int |
195g_io_getattr(char *attr, struct g_consumer *cp, int *len, void *ptr, struct thread *tp __unused) | 196g_io_getattr(char *attr, struct g_consumer *cp, int *len, void *ptr) |
196{ 197 struct bio *bp; 198 int error; 199 200 g_trace(G_T_BIO, "bio_getattr(%s)", attr); 201 do { 202 bp = g_new_bio(); 203 bp->bio_cmd = BIO_GETATTR; --- 171 unchanged lines hidden --- | 197{ 198 struct bio *bp; 199 int error; 200 201 g_trace(G_T_BIO, "bio_getattr(%s)", attr); 202 do { 203 bp = g_new_bio(); 204 bp->bio_cmd = BIO_GETATTR; --- 171 unchanged lines hidden --- |