Deleted Added
sdiff udiff text old ( 243503 ) new ( 246675 )
full compact
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

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

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2012 by Delphix. All rights reserved.
24 */
25
26#include <sys/zfs_context.h>
27#include <sys/dmu.h>
28#include <sys/dmu_tx.h>
29#include <sys/space_map.h>
30#include <sys/metaslab_impl.h>
31#include <sys/vdev_impl.h>

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

92int metaslab_prefetch_limit = SPA_DVAS_PER_BP;
93
94/*
95 * Percentage bonus multiplier for metaslabs that are in the bonus area.
96 */
97int metaslab_smo_bonus_pct = 150;
98
99/*
100 * ==========================================================================
101 * Metaslab classes
102 * ==========================================================================
103 */
104metaslab_class_t *
105metaslab_class_create(spa_t *spa, space_map_ops_t *ops)
106{
107 metaslab_class_t *mc;

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

1378 } else {
1379 allocatable = vdev_allocatable(vd);
1380 }
1381 if (!allocatable)
1382 goto next;
1383
1384 /*
1385 * Avoid writing single-copy data to a failing vdev
1386 */
1387 if ((vd->vdev_stat.vs_write_errors > 0 ||
1388 vd->vdev_state < VDEV_STATE_HEALTHY) &&
1389 d == 0 && dshift == 3) {
1390 all_zero = B_FALSE;
1391 goto next;
1392 }
1393
1394 ASSERT(mg->mg_class == mc);
1395
1396 distance = vd->vdev_asize >> dshift;
1397 if (distance <= (1ULL << vd->vdev_ms_shift))

--- 265 unchanged lines hidden ---