Lines Matching defs:is

10  * source.  A copy of the CDDL is also available via the Internet at
50 * segment of the new location. This function is used in multiple ways:
53 * data is now located, and issue child I/Os for each segment's new
66 * When a block on an indirect vdev is freed or remapped, a section of
68 * keep track of how much of each mapping entry is obsolete. When
71 * is given by the following data structures, described below:
79 * of these objects is created on demand and freed when no longer
80 * needed, and is assumed to be empty if it does not exist.
84 * have a vimp_counts_object. This is an array of uint32_t's
86 * the mapping is condensed, entries from the vic_obsolete_sm_object
93 * This is a space map containing an alloc entry for every DVA that
98 * to the end of this object. When a DVA becomes obsolete, it is
99 * added to the obsolete space map. This happens when the DVA is
101 * snapshot referencing it is destroyed.
103 * - Each dataset can have a ds_remap_deadlist object. This is a
110 * - The pool can have a dp_obsolete_bpobj. This is a list of blocks
111 * in the pool that need to be marked obsolete. When a snapshot is
119 * - When freeing a block: if any DVA is on an indirect vdev, append to
132 * Condensing an indirect vdev's mapping is the process of determining
151 * which is now read only. Newly obsolete DVAs will be added to a
179 * Condense if at least this percent of the bytes in the mapping is
190 * consumed by the obsolete space map; the default of 1GB is small enough
197 * memory. The default of 128KB is considered a "trivial" amount of
203 * This is used by the test suite so that it can ensure that certain
214 * combinations each time the block is accessed. This allows all segment
222 * is intentionally not exposed as a module parameter.
229 * For plain (non-mirror) top-level vdevs (i.e. is_vdev is not a mirror),
230 * ic_vdev is the same as is_vdev. However, for mirror top-level vdevs,
231 * ic_vdev is a child of the mirror.
238 * ic_duplicate is NULL when the ic_data contents are unique, when it
239 * is determined to be a duplicate it references the primary child.
256 * is_split_offset is the offset into the i/o.
257 * This is the sum of the previous splits' is_size's.
269 * is_good_child is the child that we are currently using to
278 * The indirect_vsd_t is associated with each i/o to the indirect vdev.
279 * It is the "Vdev-Specific Data" in the zio_t's io_vsd.
296 indirect_split_t *is;
297 while ((is = list_remove_head(&iv->iv_splits)) != NULL) {
298 for (int c = 0; c < is->is_children; c++) {
299 indirect_child_t *ic = &is->is_child[c];
305 while ((ic = list_remove_head(&is->is_unique_child)) != NULL)
308 list_destroy(&is->is_unique_child);
310 kmem_free(is,
311 offsetof(indirect_split_t, is_child[is->is_children]));
344 * wrapper is provided because the DMU does not know about vdev_t's and
420 * If nothing new has been marked obsolete, there is no
443 * obsolete, condense (unless the mapping is already small enough).
708 * max_offset is greater than any of the mappings
741 * early. We don't want to complete the condense if the spa is
983 * is populated with the number of mapping entries that were duplicated.
989 * Finally, since we are doing an allocation, it is up to the caller to
1034 * each of those indirect vdevs. For example, if the segment is mapped to
1035 * segment A on indirect vdev 1, and then segment A on indirect vdev 1 is
1039 * While the callback passed to vdev_indirect_remap() is called on every vdev
1044 * Because there is a possibility that a DVA section in the indirect device
1053 * they encounter them (as is the case for remap_blkptr_cb), the caller can
1082 * Once that is done, we drop the lock and iterate over
1087 * This way we don't need to wait until the function is
1108 * removal is in progress, and then only from syncing
1109 * context. While a removal is in progress, this
1110 * function is only called for frees, which also only
1192 * This is a callback for vdev_indirect_remap() which allocates an
1211 indirect_split_t *is =
1214 is->is_children = n;
1215 is->is_size = size;
1216 is->is_split_offset = split_offset;
1217 is->is_target_offset = offset;
1218 is->is_vdev = vd;
1219 list_create(&is->is_unique_child, sizeof (indirect_child_t),
1230 is->is_child[i].ic_vdev = vd->vdev_child[i];
1231 list_link_init(&is->is_child[i].ic_node);
1234 is->is_child[0].ic_vdev = vd;
1237 list_insert_tail(&iv->iv_splits, is);
1265 for (indirect_split_t *is = list_head(&iv->iv_splits);
1266 is != NULL; is = list_next(&iv->iv_splits, is)) {
1267 for (int i = 0; i < is->is_children; i++) {
1268 indirect_child_t *ic = &is->is_child[i];
1274 * If a child is missing the data, set ic_error. Used
1284 is->is_size);
1288 ic->ic_vdev, is->is_target_offset, ic->ic_data,
1289 is->is_size, zio->io_type, zio->io_priority, 0,
1325 * This is not a split block; we are pointing to the entire
1357 * If this is a read zio, we read one copy of each
1369 for (indirect_split_t *is = list_head(&iv->iv_splits);
1370 is != NULL; is = list_next(&iv->iv_splits, is)) {
1372 is->is_vdev, is->is_target_offset,
1374 is->is_split_offset, is->is_size),
1375 is->is_size, zio->io_type,
1391 indirect_split_t *is, indirect_child_t *ic)
1404 abd_t *good_abd = is->is_good_child->ic_data;
1406 is->is_target_offset, is->is_size, good_abd, bad_abd, &zbc);
1413 * with the good copy. The DTL is checked in vdev_indirect_read_all() and
1414 * if a vdev is missing a copy of the data we set ic_error and the read is
1416 * if at all possible. ic_error is checked here and if set it suppresses
1431 for (indirect_split_t *is = list_head(&iv->iv_splits);
1432 is != NULL; is = list_next(&iv->iv_splits, is)) {
1433 for (int c = 0; c < is->is_children; c++) {
1434 indirect_child_t *ic = &is->is_child[c];
1435 if (ic == is->is_good_child)
1439 if (ic->ic_duplicate == is->is_good_child)
1443 ic->ic_vdev, is->is_target_offset,
1444 is->is_good_child->ic_data, is->is_size,
1450 * If ic_error is set the current child does not have
1457 vdev_indirect_checksum_error(zio, is, ic);
1473 for (indirect_split_t *is = list_head(&iv->iv_splits);
1474 is != NULL; is = list_next(&iv->iv_splits, is)) {
1475 for (int c = 0; c < is->is_children; c++) {
1476 indirect_child_t *ic = &is->is_child[c];
1487 NULL, zio, is->is_target_offset, is->is_size,
1495 * If then checksum is successfully validated return success.
1502 for (indirect_split_t *is = list_head(&iv->iv_splits);
1503 is != NULL; is = list_next(&iv->iv_splits, is)) {
1505 ASSERT3P(is->is_good_child->ic_data, !=, NULL);
1506 ASSERT3P(is->is_good_child->ic_duplicate, ==, NULL);
1508 abd_copy_off(zio->io_abd, is->is_good_child->ic_data,
1509 is->is_split_offset, 0, is->is_size);
1529 for (indirect_split_t *is = list_head(&iv->iv_splits);
1530 is != NULL; is = list_next(&iv->iv_splits, is))
1531 is->is_good_child = list_head(&is->is_unique_child);
1540 for (indirect_split_t *is = list_head(&iv->iv_splits);
1541 is != NULL; is = list_next(&iv->iv_splits, is)) {
1542 is->is_good_child = list_next(&is->is_unique_child,
1543 is->is_good_child);
1544 if (is->is_good_child != NULL) {
1549 is->is_good_child = list_head(&is->is_unique_child);
1571 for (indirect_split_t *is = list_head(&iv->iv_splits);
1572 is != NULL; is = list_next(&iv->iv_splits, is)) {
1573 indirect_child_t *ic = list_head(&is->is_unique_child);
1574 int children = is->is_unique_children;
1577 ic = list_next(&is->is_unique_child, ic);
1580 is->is_good_child = ic;
1591 * This is a validation function for reconstruction. It randomly selects
1602 for (indirect_split_t *is = list_head(&iv->iv_splits);
1603 is != NULL; is = list_next(&iv->iv_splits, is)) {
1604 is->is_unique_children = 0;
1606 for (int i = 0; i < is->is_children; i++) {
1607 indirect_child_t *ic = &is->is_child[i];
1609 is->is_unique_children++;
1610 list_insert_tail(&is->is_unique_child, ic);
1614 if (list_is_empty(&is->is_unique_child)) {
1622 * is known to contain validated data.
1637 for (indirect_split_t *is = list_head(&iv->iv_splits);
1638 is != NULL; is = list_next(&iv->iv_splits, is)) {
1639 for (int c = 0; c < is->is_children; c++) {
1640 indirect_child_t *ic = &is->is_child[c];
1642 if (ic == is->is_good_child)
1659 for (indirect_split_t *is = list_head(&iv->iv_splits);
1660 is != NULL; is = list_next(&iv->iv_splits, is)) {
1662 while ((ic = list_remove_head(&is->is_unique_child)) != NULL)
1665 is->is_unique_children = 0;
1672 * This function is called when we have read all copies of the data and need
1683 * at most one is correct.
1685 * When the total number of combinations is small they can all be checked.
1697 * combinations, which is similar to bitwise-little-endian counting in
1699 * base of each digit is is_children, which can be different for each
1737 * Known_good will be TRUE when reconstruction is known to be possible.
1750 for (indirect_split_t *is = list_head(&iv->iv_splits);
1751 is != NULL; is = list_next(&iv->iv_splits, is)) {
1752 is->is_unique_children = 0;
1754 for (int i = 0; i < is->is_children; i++) {
1755 indirect_child_t *ic_i = &is->is_child[i];
1761 for (int j = i + 1; j < is->is_children; j++) {
1762 indirect_child_t *ic_j = &is->is_child[j];
1772 is->is_unique_children++;
1773 list_insert_tail(&is->is_unique_child, ic_i);
1776 /* Reconstruction is impossible, no valid children */
1777 EQUIV(list_is_empty(&is->is_unique_child),
1778 is->is_unique_children == 0);
1779 if (list_is_empty(&is->is_unique_child)) {
1786 iv->iv_unique_combinations *= is->is_unique_children;
1839 * manipulated while the I/O is taking place. The checksum verify error
1857 * vdev_indirect_io_done() is called, iv_reconstruct will be set.