summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-08-17 14:02:32 -0400
committerGitHub <[email protected]>2020-08-17 11:02:32 -0700
commit3eaf76a8d2a6fb9bfaeca888bfd20535d7e1e71b (patch)
treeec402c38fbe9311ed8ca97c31432b3a2a6586964 /module/zfs
parent3c3d7c8a57b278063952fc671fc2cf1589e45a6a (diff)
Fix l2arc_dev_rebuild_start thread name
`thread_create` on FreeBSD stringifies the argument passed as the thread function to create a name for the thread. The thread name for `l2arc_dev_rebuild_start` ended up with `(void (*)(void *))` in it. Change the type signature so the function does not need to be cast when creating the thread. Rename the function to `l2arc_dev_rebuild_thread` for clarity and consistency, as well. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Amanakis <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10716
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/arc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 19ad42d29..06c2d5fac 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -920,7 +920,7 @@ unsigned long l2arc_rebuild_blocks_min_l2size = 1024 * 1024 * 1024;
/* L2ARC persistence rebuild control routines. */
void l2arc_rebuild_vdev(vdev_t *vd, boolean_t reopen);
-static void l2arc_dev_rebuild_start(l2arc_dev_t *dev);
+static void l2arc_dev_rebuild_thread(void *arg);
static int l2arc_rebuild(l2arc_dev_t *dev);
/* L2ARC persistence read I/O routines. */
@@ -9500,8 +9500,7 @@ l2arc_spa_rebuild_start(spa_t *spa)
mutex_enter(&l2arc_rebuild_thr_lock);
if (dev->l2ad_rebuild && !dev->l2ad_rebuild_cancel) {
dev->l2ad_rebuild_began = B_TRUE;
- (void) thread_create(NULL, 0,
- (void (*)(void *))l2arc_dev_rebuild_start,
+ (void) thread_create(NULL, 0, l2arc_dev_rebuild_thread,
dev, 0, &p0, TS_RUN, minclsyspri);
}
mutex_exit(&l2arc_rebuild_thr_lock);
@@ -9512,8 +9511,10 @@ l2arc_spa_rebuild_start(spa_t *spa)
* Main entry point for L2ARC rebuilding.
*/
static void
-l2arc_dev_rebuild_start(l2arc_dev_t *dev)
+l2arc_dev_rebuild_thread(void *arg)
{
+ l2arc_dev_t *dev = arg;
+
VERIFY(!dev->l2ad_rebuild_cancel);
VERIFY(dev->l2ad_rebuild);
(void) l2arc_rebuild(dev);