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

Function too_many_errors

freebsd/contrib/openzfs/module/zfs/vdev_root.c:66–81  ·  view source on GitHub ↗

* We should be able to tolerate one failure with absolutely no damage * to our metadata. Two failures will take out space maps, a bunch of * indirect block trees, meta dnodes, dnodes, etc. Probably not a happy * place to live. When we get smarter, we can liberalize this policy. * e.g. If we haven't lost two consecutive top-level vdevs, then we are * probably fine. Adding bean counters dur

Source from the content-addressed store, hash-verified

64 * future guesswork more accurate.
65 */
66static boolean_t
67too_many_errors(vdev_t *vd, uint64_t numerrors)
68{
69 uint64_t tvds;
70
71 if (numerrors == 0)
72 return (B_FALSE);
73
74 tvds = vdev_root_core_tvds(vd);
75 ASSERT3U(numerrors, <=, tvds);
76
77 if (numerrors == tvds)
78 return (B_TRUE);
79
80 return (numerrors > spa_missing_tvds_allowed(vd->vdev_spa));
81}
82
83static int
84vdev_root_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize,

Callers 2

vdev_root_openFunction · 0.85
vdev_root_state_changeFunction · 0.85

Calls 2

vdev_root_core_tvdsFunction · 0.85
spa_missing_tvds_allowedFunction · 0.85

Tested by

no test coverage detected