From 044baf009aac4935eca0f96477eb3c43e95d758a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 3 May 2013 14:17:21 -0700 Subject: 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 Closes #1399 Closes #1423 --- include/sys/zfs_context.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sys/zfs_context.h') diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index a23bfdcf8..0b24216b5 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -409,6 +409,7 @@ extern int taskq_empty_ent(taskq_ent_t *); extern void taskq_init_ent(taskq_ent_t *); extern void taskq_destroy(taskq_t *); extern void taskq_wait(taskq_t *); +extern void taskq_wait_id(taskq_t *, taskqid_t); extern int taskq_member(taskq_t *, kthread_t *); extern int taskq_cancel_id(taskq_t *, taskqid_t); extern void system_taskq_init(void); -- cgit v1.2.3