* Use zio_data_buf_alloc to allocate data. The data will not appear in a * crashdump if the kernel panics. This exists so that we will limit the amount * of ZFS data that shows up in a kernel crashdump. (Thus reducing the amount * of kernel heap dumped to disk when the kernel panics) */
| 338 | * of kernel heap dumped to disk when the kernel panics) |
| 339 | */ |
| 340 | void * |
| 341 | zio_data_buf_alloc(size_t size) |
| 342 | { |
| 343 | size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; |
| 344 | |
| 345 | VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); |
| 346 | |
| 347 | return (kmem_cache_alloc(zio_data_buf_cache[c], KM_PUSHPAGE)); |
| 348 | } |
| 349 | |
| 350 | void |
| 351 | zio_buf_free(void *buf, size_t size) |
no test coverage detected