fix up r354333, make zfsproc visible to dtrace, rename to system_proc

I overlooked the fact that zfsproc is required by dtrace modules that
use illumos compatible taskq KPI.  So, move the symbol definition to
the opensolaris module that provides compatibility support for both ZFS
and DTrace.  Also, rename zfsproc to system_proc to reflect that it is
not specific to ZFS.

Reported by:	ae
MFC after:	5 weeks
X-MFC with:	ae
This commit is contained in:
avg 2019-11-05 14:34:59 +00:00
parent ee8d0a4ed1
commit a32f0e20c2
4 changed files with 6 additions and 5 deletions

View File

@ -42,6 +42,8 @@ static uma_zone_t taskq_zone;
taskq_t *system_taskq = NULL;
struct proc *system_proc;
static void
system_taskq_init(void *arg)
{
@ -84,7 +86,7 @@ taskq_t *
taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused,
int maxalloc __unused, uint_t flags)
{
return (taskq_create_impl(name, nthreads, pri, zfsproc, flags));
return (taskq_create_impl(name, nthreads, pri, system_proc, flags));
}
taskq_t *

View File

@ -61,7 +61,7 @@ typedef struct thread kthread_t;
typedef struct thread *kthread_id_t;
typedef struct proc proc_t;
extern struct proc *zfsproc;
extern struct proc *system_proc;
static __inline kthread_t *
do_thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), void *arg,
@ -80,7 +80,7 @@ do_thread_create(caddr_t stk, size_t stksize, void (*proc)(void *), void *arg,
ASSERT(pp != NULL);
if (pp == &p0)
ppp = &zfsproc;
ppp = &system_proc;
else
ppp = &pp;
error = kproc_kthread_add(proc, arg, ppp, &td, RFSTOPPED,

View File

@ -7098,7 +7098,6 @@ zfsdev_fini(void)
}
static struct root_hold_token *zfs_root_token;
struct proc *zfsproc;
#ifdef illumos
int

View File

@ -2685,7 +2685,7 @@ zvol_geom_run(zvol_state_t *zv)
pp = zv->zv_provider;
g_error_provider(pp, 0);
kproc_kthread_add(zvol_geom_worker, zv, &zfsproc, NULL, 0, 0,
kproc_kthread_add(zvol_geom_worker, zv, &system_proc, NULL, 0, 0,
"zfskern", "zvol %s", pp->name + sizeof(ZVOL_DRIVER));
}