| 136 | } |
| 137 | |
| 138 | static void |
| 139 | vdev_raidz_row_free(raidz_row_t *rr) |
| 140 | { |
| 141 | int c; |
| 142 | |
| 143 | for (c = 0; c < rr->rr_firstdatacol && c < rr->rr_cols; c++) { |
| 144 | abd_free(rr->rr_col[c].rc_abd); |
| 145 | |
| 146 | if (rr->rr_col[c].rc_gdata != NULL) { |
| 147 | abd_free(rr->rr_col[c].rc_gdata); |
| 148 | } |
| 149 | if (rr->rr_col[c].rc_orig_data != NULL) { |
| 150 | zio_buf_free(rr->rr_col[c].rc_orig_data, |
| 151 | rr->rr_col[c].rc_size); |
| 152 | } |
| 153 | } |
| 154 | for (c = rr->rr_firstdatacol; c < rr->rr_cols; c++) { |
| 155 | if (rr->rr_col[c].rc_size != 0) { |
| 156 | if (abd_is_gang(rr->rr_col[c].rc_abd)) |
| 157 | abd_free(rr->rr_col[c].rc_abd); |
| 158 | else |
| 159 | abd_put(rr->rr_col[c].rc_abd); |
| 160 | } |
| 161 | if (rr->rr_col[c].rc_orig_data != NULL) { |
| 162 | zio_buf_free(rr->rr_col[c].rc_orig_data, |
| 163 | rr->rr_col[c].rc_size); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | if (rr->rr_abd_copy != NULL) |
| 168 | abd_free(rr->rr_abd_copy); |
| 169 | |
| 170 | if (rr->rr_abd_empty != NULL) |
| 171 | abd_free(rr->rr_abd_empty); |
| 172 | |
| 173 | kmem_free(rr, offsetof(raidz_row_t, rr_col[rr->rr_scols])); |
| 174 | } |
| 175 | |
| 176 | void |
| 177 | vdev_raidz_map_free(raidz_map_t *rm) |
no test coverage detected