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

Function vdev_dtl_contains

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

Source from the content-addressed store, hash-verified

2641}
2642
2643boolean_t
2644vdev_dtl_contains(vdev_t *vd, vdev_dtl_type_t t, uint64_t txg, uint64_t size)
2645{
2646 range_tree_t *rt = vd->vdev_dtl[t];
2647 boolean_t dirty = B_FALSE;
2648
2649 ASSERT(t < DTL_TYPES);
2650 ASSERT(vd != vd->vdev_spa->spa_root_vdev);
2651
2652 /*
2653 * While we are loading the pool, the DTLs have not been loaded yet.
2654 * This isn't a problem but it can result in devices being tried
2655 * which are known to not have the data. In which case, the import
2656 * is relying on the checksum to ensure that we get the right data.
2657 * Note that while importing we are only reading the MOS, which is
2658 * always checksummed.
2659 */
2660 mutex_enter(&vd->vdev_dtl_lock);
2661 if (!range_tree_is_empty(rt))
2662 dirty = range_tree_contains(rt, txg, size);
2663 mutex_exit(&vd->vdev_dtl_lock);
2664
2665 return (dirty);
2666}
2667
2668boolean_t
2669vdev_dtl_empty(vdev_t *vd, vdev_dtl_type_t t)

Callers 12

vdev_raidz_io_start_readFunction · 0.85
vdev_raidz_need_resilverFunction · 0.85
vdev_stat_updateFunction · 0.85
vdev_draid_missingFunction · 0.85
vdev_draid_partialFunction · 0.85
vdev_draid_need_resilverFunction · 0.85
vdev_mirror_io_doneFunction · 0.85
zfs_ereport_is_validFunction · 0.85
vdev_indirect_read_allFunction · 0.85
zio_vdev_io_startFunction · 0.85

Calls 4

mutex_enterFunction · 0.85
range_tree_is_emptyFunction · 0.85
range_tree_containsFunction · 0.85
mutex_exitFunction · 0.85

Tested by

no test coverage detected