* DTLs. * * A vdev's DTL (dirty time log) is the set of transaction groups for which * the vdev has less than perfect replication. There are four kinds of DTL: * * DTL_MISSING: txgs for which the vdev has no valid copies of the data * * DTL_PARTIAL: txgs for which data is available, but not fully replicated * * DTL_SCRUB: the txgs that could not be repaired by the last scrub; upon * scr
| 2626 | * a configuration change, we generate all other DTLs from first principles. |
| 2627 | */ |
| 2628 | void |
| 2629 | vdev_dtl_dirty(vdev_t *vd, vdev_dtl_type_t t, uint64_t txg, uint64_t size) |
| 2630 | { |
| 2631 | range_tree_t *rt = vd->vdev_dtl[t]; |
| 2632 | |
| 2633 | ASSERT(t < DTL_TYPES); |
| 2634 | ASSERT(vd != vd->vdev_spa->spa_root_vdev); |
| 2635 | ASSERT(spa_writeable(vd->vdev_spa)); |
| 2636 | |
| 2637 | mutex_enter(&vd->vdev_dtl_lock); |
| 2638 | if (!range_tree_contains(rt, txg, size)) |
| 2639 | range_tree_add(rt, txg, size); |
| 2640 | mutex_exit(&vd->vdev_dtl_lock); |
| 2641 | } |
| 2642 | |
| 2643 | boolean_t |
| 2644 | vdev_dtl_contains(vdev_t *vd, vdev_dtl_type_t t, uint64_t txg, uint64_t size) |
no test coverage detected