aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-01-13 14:59:57 -0500
committerAlasdair G Kergon <agk@redhat.com>2011-01-13 14:59:57 -0500
commit4d4d66ab5322fa9b0f51842a76139387a40e1ce9 (patch)
tree37485e2fa56c38044c496ac5632e8304c5cc25db /drivers
parentf521f074abe7b3990f5df65482cdc3d851b80665 (diff)
dm: convert workqueues to alloc_ordered
Convert all create[_singlethread]_work() users to the new alloc[_ordered]_workqueue(). This conversion is mechanical and doesn't introduce any behavior change. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-delay.c2
-rw-r--r--drivers/md/dm-kcopyd.c2
-rw-r--r--drivers/md/dm-mpath.c5
-rw-r--r--drivers/md/dm-raid1.c2
-rw-r--r--drivers/md/dm-snap-persistent.c2
-rw-r--r--drivers/md/dm.c2
6 files changed, 8 insertions, 7 deletions
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c
index baa11912cc94..f18375dcedd9 100644
--- a/drivers/md/dm-delay.c
+++ b/drivers/md/dm-delay.c
@@ -352,7 +352,7 @@ static int __init dm_delay_init(void)
352{ 352{
353 int r = -ENOMEM; 353 int r = -ENOMEM;
354 354
355 kdelayd_wq = create_workqueue("kdelayd"); 355 kdelayd_wq = alloc_workqueue("kdelayd", WQ_MEM_RECLAIM, 0);
356 if (!kdelayd_wq) { 356 if (!kdelayd_wq) {
357 DMERR("Couldn't start kdelayd"); 357 DMERR("Couldn't start kdelayd");
358 goto bad_queue; 358 goto bad_queue;
diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c
index dad32f8bce7d..63d67169c7f4 100644
--- a/drivers/md/dm-kcopyd.c
+++ b/drivers/md/dm-kcopyd.c
@@ -672,7 +672,7 @@ int dm_kcopyd_client_create(unsigned int nr_pages,
672 goto bad_slab; 672 goto bad_slab;
673 673
674 INIT_WORK(&kc->kcopyd_work, do_work); 674 INIT_WORK(&kc->kcopyd_work, do_work);
675 kc->kcopyd_wq = create_singlethread_workqueue("kcopyd"); 675 kc->kcopyd_wq = alloc_ordered_workqueue("kcopyd", WQ_MEM_RECLAIM);
676 if (!kc->kcopyd_wq) 676 if (!kc->kcopyd_wq)
677 goto bad_workqueue; 677 goto bad_workqueue;
678 678
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index fcc59c3f756e..35ab5781f88f 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1675,7 +1675,7 @@ static int __init dm_multipath_init(void)
1675 return -EINVAL; 1675 return -EINVAL;
1676 } 1676 }
1677 1677
1678 kmultipathd = create_workqueue("kmpathd"); 1678 kmultipathd = alloc_workqueue("kmpathd", WQ_MEM_RECLAIM, 0);
1679 if (!kmultipathd) { 1679 if (!kmultipathd) {
1680 DMERR("failed to create workqueue kmpathd"); 1680 DMERR("failed to create workqueue kmpathd");
1681 dm_unregister_target(&multipath_target); 1681 dm_unregister_target(&multipath_target);
@@ -1689,7 +1689,8 @@ static int __init dm_multipath_init(void)
1689 * old workqueue would also create a bottleneck in the 1689 * old workqueue would also create a bottleneck in the
1690 * path of the storage hardware device activation. 1690 * path of the storage hardware device activation.
1691 */ 1691 */
1692 kmpath_handlerd = create_singlethread_workqueue("kmpath_handlerd"); 1692 kmpath_handlerd = alloc_ordered_workqueue("kmpath_handlerd",
1693 WQ_MEM_RECLAIM);
1693 if (!kmpath_handlerd) { 1694 if (!kmpath_handlerd) {
1694 DMERR("failed to create workqueue kmpath_handlerd"); 1695 DMERR("failed to create workqueue kmpath_handlerd");
1695 destroy_workqueue(kmultipathd); 1696 destroy_workqueue(kmultipathd);
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 0d58b6f875cc..39917430f9f8 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -1085,7 +1085,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv)
1085 ti->num_flush_requests = 1; 1085 ti->num_flush_requests = 1;
1086 ti->num_discard_requests = 1; 1086 ti->num_discard_requests = 1;
1087 1087
1088 ms->kmirrord_wq = create_singlethread_workqueue("kmirrord"); 1088 ms->kmirrord_wq = alloc_ordered_workqueue("kmirrord", WQ_MEM_RECLAIM);
1089 if (!ms->kmirrord_wq) { 1089 if (!ms->kmirrord_wq) {
1090 DMERR("couldn't start kmirrord"); 1090 DMERR("couldn't start kmirrord");
1091 r = -ENOMEM; 1091 r = -ENOMEM;
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c
index 2129cdb115dc..d3021a69c857 100644
--- a/drivers/md/dm-snap-persistent.c
+++ b/drivers/md/dm-snap-persistent.c
@@ -818,7 +818,7 @@ static int persistent_ctr(struct dm_exception_store *store,
818 atomic_set(&ps->pending_count, 0); 818 atomic_set(&ps->pending_count, 0);
819 ps->callbacks = NULL; 819 ps->callbacks = NULL;
820 820
821 ps->metadata_wq = create_singlethread_workqueue("ksnaphd"); 821 ps->metadata_wq = alloc_ordered_workqueue("ksnaphd", WQ_MEM_RECLAIM);
822 if (!ps->metadata_wq) { 822 if (!ps->metadata_wq) {
823 kfree(ps); 823 kfree(ps);
824 DMERR("couldn't start header metadata update thread"); 824 DMERR("couldn't start header metadata update thread");
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 0de692176ad4..39aaa9290128 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1883,7 +1883,7 @@ static struct mapped_device *alloc_dev(int minor)
1883 add_disk(md->disk); 1883 add_disk(md->disk);
1884 format_dev_t(md->name, MKDEV(_major, minor)); 1884 format_dev_t(md->name, MKDEV(_major, minor));
1885 1885
1886 md->wq = create_singlethread_workqueue("kdmflush"); 1886 md->wq = alloc_ordered_workqueue("kdmflush", WQ_MEM_RECLAIM);
1887 if (!md->wq) 1887 if (!md->wq)
1888 goto bad_thread; 1888 goto bad_thread;
1889 1889