diff options
author | 2014-07-12 07:39:11 +0000 | |
---|---|---|
committer | 2014-07-12 07:39:11 +0000 | |
commit | 3b545d8f54e767eec92be0b905a6117d6d277960 (patch) | |
tree | a0564e9ce4bdf68291ccba17bb0d63c1eaf41fd5 /sys | |
parent | move macppc abtn(4) driver from workq to taskq (diff) | |
download | wireguard-openbsd-3b545d8f54e767eec92be0b905a6117d6d277960.tar.xz wireguard-openbsd-3b545d8f54e767eec92be0b905a6117d6d277960.zip |
essentially mechanical conversion of softraid rebuild from
workq to taskq
ok jsing@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/softraid.c | 4 | ||||
-rw-r--r-- | sys/dev/softraid_raid1.c | 4 | ||||
-rw-r--r-- | sys/dev/softraidvar.h | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 91bca8a61f5..a6ffba7f70d 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.332 2014/07/10 12:21:09 mpi Exp $ */ +/* $OpenBSD: softraid.c,v 1.333 2014/07/12 07:39:11 blambert Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -3927,6 +3927,8 @@ sr_discipline_init(struct sr_discipline *sd, int level) sd->sd_start_discipline = NULL; task_set(&sd->sd_meta_save_task, sr_meta_save_callback, sd, NULL); + task_set(&sd->sd_hotspare_rebuild_task, sr_hotspare_rebuild_callback, + sd, NULL); switch (level) { case 0: diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c index 0fd442a3535..28e06b20b5f 100644 --- a/sys/dev/softraid_raid1.c +++ b/sys/dev/softraid_raid1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid1.c,v 1.56 2014/01/22 04:24:29 jsing Exp $ */ +/* $OpenBSD: softraid_raid1.c,v 1.57 2014/07/12 07:39:12 blambert Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -322,7 +322,7 @@ die: /* If we have just become degraded, look for a hotspare. */ if (new_state == BIOC_SVDEGRADED) - workq_add_task(NULL, 0, sr_hotspare_rebuild_callback, sd, NULL); + task_add(systq, &sd->sd_hotspare_rebuild_task); } int diff --git a/sys/dev/softraidvar.h b/sys/dev/softraidvar.h index 6de87bebd0a..edf783fa0ac 100644 --- a/sys/dev/softraidvar.h +++ b/sys/dev/softraidvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softraidvar.h,v 1.155 2014/07/10 12:21:09 mpi Exp $ */ +/* $OpenBSD: softraidvar.h,v 1.156 2014/07/12 07:39:11 blambert Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -617,6 +617,7 @@ struct sr_discipline { /* Tasks. */ struct task sd_meta_save_task; + struct task sd_hotspare_rebuild_task; TAILQ_ENTRY(sr_discipline) sd_link; }; |