* 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
| 64 | * future guesswork more accurate. |
| 65 | */ |
| 66 | static boolean_t |
| 67 | too_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 | |
| 83 | static int |
| 84 | vdev_root_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, |
no test coverage detected