| 5334 | } |
| 5335 | |
| 5336 | static int |
| 5337 | dump_bytes(objset_t *os, void *buf, int len, void *arg) |
| 5338 | { |
| 5339 | dump_bytes_io_t dbi; |
| 5340 | |
| 5341 | dbi.dbi_fp = arg; |
| 5342 | dbi.dbi_buf = buf; |
| 5343 | dbi.dbi_len = len; |
| 5344 | |
| 5345 | #if defined(HAVE_LARGE_STACKS) |
| 5346 | dump_bytes_cb(&dbi); |
| 5347 | #else |
| 5348 | /* |
| 5349 | * The vn_rdwr() call is performed in a taskq to ensure that there is |
| 5350 | * always enough stack space to write safely to the target filesystem. |
| 5351 | * The ZIO_TYPE_FREE threads are used because there can be a lot of |
| 5352 | * them and they are used in vdev_file.c for a similar purpose. |
| 5353 | */ |
| 5354 | spa_taskq_dispatch_sync(dmu_objset_spa(os), ZIO_TYPE_FREE, |
| 5355 | ZIO_TASKQ_ISSUE, dump_bytes_cb, &dbi, TQ_SLEEP); |
| 5356 | #endif /* HAVE_LARGE_STACKS */ |
| 5357 | |
| 5358 | return (dbi.dbi_err); |
| 5359 | } |
| 5360 | |
| 5361 | /* |
| 5362 | * inputs: |
nothing calls this directly
no test coverage detected