diff options
author | Brian Behlendorf <[email protected]> | 2016-01-20 15:58:29 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-01-22 09:39:46 -0800 |
commit | 519129ff4e717f3026ae70b58d2db59d937aef06 (patch) | |
tree | c4c29be71b19583ff2c76bc8363103ba0087e4c2 /lib/libzpool/kernel.c | |
parent | 19d55079aecb5c022c1c09e0eace4f7da7381a62 (diff) |
Illumos 6815179, 6844191
6815179 zpool import with a large number of LUNs is too slow
6844191 zpool import, scanning of disks should be multi-threaded
References:
https://github.com/illumos/illumos-gate/commit/4f67d75
Porting notes:
- This change was originally never ported to Linux due to it
dependence on the thread pool interface. This patch solves
that issue by switching the code to use the existing taskq
implementation which provides the same basic functionality.
However, in order for this to work properly thread_init()
and thread_fini() must be called around to taskq consumer
to perform the needed thread initialization.
- The check_one_slice, nozpool_all_slices, and check_slices
functions have been disabled for Linux. They are difficult,
but possible, to implement for Linux due to how partitions
are get names. Since this is only an optimization this code
can be added at a latter date.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'lib/libzpool/kernel.c')
-rw-r--r-- | lib/libzpool/kernel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index 5d26f7ca8..6ed08bdb0 100644 --- a/lib/libzpool/kernel.c +++ b/lib/libzpool/kernel.c @@ -68,7 +68,7 @@ pthread_mutex_t kthread_lock = PTHREAD_MUTEX_INITIALIZER; pthread_key_t kthread_key; int kthread_nr = 0; -static void +void thread_init(void) { kthread_t *kt; @@ -87,7 +87,7 @@ thread_init(void) kthread_nr = 1; } -static void +void thread_fini(void) { kthread_t *kt = curthread; |