* Are there special vdevs? */
| 68 | * Are there special vdevs? |
| 69 | */ |
| 70 | boolean_t |
| 71 | zfs_special_devs(nvlist_t *nv, char *type) |
| 72 | { |
| 73 | char *bias; |
| 74 | uint_t c; |
| 75 | nvlist_t **child; |
| 76 | uint_t children; |
| 77 | |
| 78 | if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, |
| 79 | &child, &children) != 0) { |
| 80 | return (B_FALSE); |
| 81 | } |
| 82 | for (c = 0; c < children; c++) { |
| 83 | if (nvlist_lookup_string(child[c], ZPOOL_CONFIG_ALLOCATION_BIAS, |
| 84 | &bias) == 0) { |
| 85 | if (strcmp(bias, VDEV_ALLOC_BIAS_SPECIAL) == 0 || |
| 86 | strcmp(bias, VDEV_ALLOC_BIAS_DEDUP) == 0) { |
| 87 | if (type != NULL && strcmp(bias, type) == 0) { |
| 88 | return (B_TRUE); |
| 89 | } else if (type == NULL) { |
| 90 | return (B_TRUE); |
| 91 | } |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | return (B_FALSE); |
| 96 | } |
| 97 | |
| 98 | void |
| 99 | zpool_get_load_policy(nvlist_t *nvl, zpool_load_policy_t *zlpp) |
no test coverage detected