Deleted Added
sdiff udiff text old ( 223089 ) new ( 237518 )
full compact
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

--- 20 unchanged lines hidden (view full) ---

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
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/geom/geom_subr.c 223089 2011-06-14 17:10:32Z gibbs $");
38
39#include "opt_ddb.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/devicestat.h>
44#include <sys/kernel.h>
45#include <sys/malloc.h>

--- 300 unchanged lines hidden (view full) ---

346 LIST_INSERT_HEAD(&mp->geom, gp, geom);
347 TAILQ_INSERT_HEAD(&geoms, gp, geoms);
348 strcpy(gp->name, sbuf_data(sb));
349 sbuf_delete(sb);
350 /* Fill in defaults from class */
351 gp->start = mp->start;
352 gp->spoiled = mp->spoiled;
353 gp->attrchanged = mp->attrchanged;
354 gp->dumpconf = mp->dumpconf;
355 gp->access = mp->access;
356 gp->orphan = mp->orphan;
357 gp->ioctl = mp->ioctl;
358 return (gp);
359}
360
361void

--- 267 unchanged lines hidden (view full) ---

629 ("g_destroy_provider but attached"));
630 KASSERT (pp->acr == 0, ("g_destroy_provider with acr"));
631 KASSERT (pp->acw == 0, ("g_destroy_provider with acw"));
632 KASSERT (pp->ace == 0, ("g_destroy_provider with ace"));
633 g_cancel_event(pp);
634 LIST_REMOVE(pp, provider);
635 gp = pp->geom;
636 devstat_remove_entry(pp->stat);
637 g_free(pp);
638 if ((gp->flags & G_GEOM_WITHER))
639 g_do_wither();
640}
641
642/*
643 * We keep the "geoms" list sorted by topological order (== increasing
644 * numerical rank) at all times.

--- 740 unchanged lines hidden ---