| 185 | } |
| 186 | |
| 187 | abd_t * |
| 188 | abd_alloc_struct(size_t size) |
| 189 | { |
| 190 | /* |
| 191 | * In Linux we do not use the size passed in during ABD |
| 192 | * allocation, so we just ignore it. |
| 193 | */ |
| 194 | abd_t *abd = kmem_cache_alloc(abd_cache, KM_PUSHPAGE); |
| 195 | ASSERT3P(abd, !=, NULL); |
| 196 | list_link_init(&abd->abd_gang_link); |
| 197 | mutex_init(&abd->abd_mtx, NULL, MUTEX_DEFAULT, NULL); |
| 198 | ABDSTAT_INCR(abdstat_struct_size, sizeof (abd_t)); |
| 199 | |
| 200 | return (abd); |
| 201 | } |
| 202 | |
| 203 | void |
| 204 | abd_free_struct(abd_t *abd) |
no test coverage detected