geom_subr.c (248674) | geom_subr.c (255860) |
---|---|
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> | 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 248674 2013-03-24 03:15:20Z mav $"); | 37__FBSDID("$FreeBSD: head/sys/geom/geom_subr.c 255860 2013-09-24 20:05:16Z des $"); |
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> --- 220 unchanged lines hidden (view full) --- 266 struct g_geom *gp; 267 struct g_hh00 *hh; 268 struct g_provider *pp; 269 struct g_consumer *cp; 270 271 g_topology_assert(); 272 if (flag == EV_CANCEL) /* XXX: can't happen ? */ 273 return; | 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> --- 220 unchanged lines hidden (view full) --- 266 struct g_geom *gp; 267 struct g_hh00 *hh; 268 struct g_provider *pp; 269 struct g_consumer *cp; 270 271 g_topology_assert(); 272 if (flag == EV_CANCEL) /* XXX: can't happen ? */ 273 return; |
274 if (g_shutdown) | 274 if (g_shutdown || g_notaste) |
275 return; 276 277 hh = arg; 278 mp = hh->mp; 279 hh->error = 0; 280 if (hh->post) { 281 g_free(hh); 282 hh = NULL; --- 252 unchanged lines hidden (view full) --- 535 G_VALID_PROVIDER(pp); 536 KASSERT(!(pp->flags & G_PF_WITHER), 537 ("g_new_provider_event but withered")); 538 LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, next_cp) { 539 if ((cp->flags & G_CF_ORPHAN) == 0 && 540 cp->geom->attrchanged != NULL) 541 cp->geom->attrchanged(cp, "GEOM::media"); 542 } | 275 return; 276 277 hh = arg; 278 mp = hh->mp; 279 hh->error = 0; 280 if (hh->post) { 281 g_free(hh); 282 hh = NULL; --- 252 unchanged lines hidden (view full) --- 535 G_VALID_PROVIDER(pp); 536 KASSERT(!(pp->flags & G_PF_WITHER), 537 ("g_new_provider_event but withered")); 538 LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, next_cp) { 539 if ((cp->flags & G_CF_ORPHAN) == 0 && 540 cp->geom->attrchanged != NULL) 541 cp->geom->attrchanged(cp, "GEOM::media"); 542 } |
543 if (g_notaste) 544 return; |
|
543 LIST_FOREACH(mp, &g_classes, class) { 544 if (mp->taste == NULL) 545 continue; 546 LIST_FOREACH(cp, &pp->consumers, consumers) 547 if (cp->geom->class == mp && 548 (cp->flags & G_CF_ORPHAN) == 0) 549 break; 550 if (cp != NULL) --- 967 unchanged lines hidden --- | 545 LIST_FOREACH(mp, &g_classes, class) { 546 if (mp->taste == NULL) 547 continue; 548 LIST_FOREACH(cp, &pp->consumers, consumers) 549 if (cp->geom->class == mp && 550 (cp->flags & G_CF_ORPHAN) == 0) 551 break; 552 if (cp != NULL) --- 967 unchanged lines hidden --- |