MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vdev_dtl_dirty

Function vdev_dtl_dirty

freebsd/contrib/openzfs/module/zfs/vdev.c:2628–2641  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

2626 * a configuration change, we generate all other DTLs from first principles.
2627 */
2628void
2629vdev_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
2643boolean_t
2644vdev_dtl_contains(vdev_t *vd, vdev_dtl_type_t t, uint64_t txg, uint64_t size)

Callers 2

vdev_stat_updateFunction · 0.85
spa_vdev_attachFunction · 0.85

Calls 5

spa_writeableFunction · 0.85
mutex_enterFunction · 0.85
range_tree_containsFunction · 0.85
range_tree_addFunction · 0.85
mutex_exitFunction · 0.85

Tested by

no test coverage detected