diff options
author | Brian Behlendorf <[email protected]> | 2013-05-03 14:17:21 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-05-06 14:05:42 -0700 |
commit | 044baf009aac4935eca0f96477eb3c43e95d758a (patch) | |
tree | 6cf6572adcd16703288895b25e5ca1c5a3aba5dd /lib/libzpool/taskq.c | |
parent | 7ef5e54e2e28884a04dc800657967b891239e933 (diff) |
Use taskq for dump_bytes()
The vn_rdwr() function performs I/O by calling the vfs_write() or
vfs_read() functions. These functions reside just below the system
call layer and the expectation is they have almost the entire 8k of
stack space to work with. In fact, certain layered configurations
such as ext+lvm+md+multipath require the majority of this stack to
avoid stack overflows.
To avoid this posibility the vn_rdwr() call in dump_bytes() has been
moved to the ZIO_TYPE_FREE, taskq. This ensures that all I/O will be
performed with the majority of the stack space available. This ends
up being very similiar to as if the I/O were issued via sys_write()
or sys_read().
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1399
Closes #1423
Diffstat (limited to 'lib/libzpool/taskq.c')
-rw-r--r-- | lib/libzpool/taskq.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libzpool/taskq.c b/lib/libzpool/taskq.c index 64e214205..96c0d5c2b 100644 --- a/lib/libzpool/taskq.c +++ b/lib/libzpool/taskq.c @@ -211,6 +211,12 @@ taskq_wait(taskq_t *tq) mutex_exit(&tq->tq_lock); } +void +taskq_wait_id(taskq_t *tq, taskqid_t id) +{ + taskq_wait(tq); +} + static void taskq_thread(void *arg) { |