aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-12-07 04:57:19 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-07 04:57:19 -0500
commit8d1413b28033c49c7f1a4d320e815d7a5531acee (patch)
treeb37281abef014cd60803b81c100388d7a475d49e /drivers/md
parented25ffa16434724f5ed825aa48734c7f3aefa203 (diff)
parent620034c84d1d939717bdfbe02c51a3fee43541c3 (diff)
Merge branch 'master' into upstream
Conflicts: drivers/net/netxen/netxen_nic.h drivers/net/netxen/netxen_nic_main.c
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-crypt.c8
-rw-r--r--drivers/md/dm-mpath.c18
-rw-r--r--drivers/md/dm-raid1.c4
-rw-r--r--drivers/md/dm-snap.c9
-rw-r--r--drivers/md/kcopyd.c4
5 files changed, 23 insertions, 20 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 08a40f4e4f60..ed2d4ef27fd8 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -458,11 +458,11 @@ static void dec_pending(struct crypt_io *io, int error)
458 * interrupt context. 458 * interrupt context.
459 */ 459 */
460static struct workqueue_struct *_kcryptd_workqueue; 460static struct workqueue_struct *_kcryptd_workqueue;
461static void kcryptd_do_work(void *data); 461static void kcryptd_do_work(struct work_struct *work);
462 462
463static void kcryptd_queue_io(struct crypt_io *io) 463static void kcryptd_queue_io(struct crypt_io *io)
464{ 464{
465 INIT_WORK(&io->work, kcryptd_do_work, io); 465 INIT_WORK(&io->work, kcryptd_do_work);
466 queue_work(_kcryptd_workqueue, &io->work); 466 queue_work(_kcryptd_workqueue, &io->work);
467} 467}
468 468
@@ -618,9 +618,9 @@ static void process_read_endio(struct crypt_io *io)
618 dec_pending(io, crypt_convert(cc, &ctx)); 618 dec_pending(io, crypt_convert(cc, &ctx));
619} 619}
620 620
621static void kcryptd_do_work(void *data) 621static void kcryptd_do_work(struct work_struct *work)
622{ 622{
623 struct crypt_io *io = data; 623 struct crypt_io *io = container_of(work, struct crypt_io, work);
624 624
625 if (io->post_process) 625 if (io->post_process)
626 process_read_endio(io); 626 process_read_endio(io);
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index d754e0bc6e90..e77ee6fd1044 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -104,8 +104,8 @@ typedef int (*action_fn) (struct pgpath *pgpath);
104static kmem_cache_t *_mpio_cache; 104static kmem_cache_t *_mpio_cache;
105 105
106struct workqueue_struct *kmultipathd; 106struct workqueue_struct *kmultipathd;
107static void process_queued_ios(void *data); 107static void process_queued_ios(struct work_struct *work);
108static void trigger_event(void *data); 108static void trigger_event(struct work_struct *work);
109 109
110 110
111/*----------------------------------------------- 111/*-----------------------------------------------
@@ -173,8 +173,8 @@ static struct multipath *alloc_multipath(struct dm_target *ti)
173 INIT_LIST_HEAD(&m->priority_groups); 173 INIT_LIST_HEAD(&m->priority_groups);
174 spin_lock_init(&m->lock); 174 spin_lock_init(&m->lock);
175 m->queue_io = 1; 175 m->queue_io = 1;
176 INIT_WORK(&m->process_queued_ios, process_queued_ios, m); 176 INIT_WORK(&m->process_queued_ios, process_queued_ios);
177 INIT_WORK(&m->trigger_event, trigger_event, m); 177 INIT_WORK(&m->trigger_event, trigger_event);
178 m->mpio_pool = mempool_create_slab_pool(MIN_IOS, _mpio_cache); 178 m->mpio_pool = mempool_create_slab_pool(MIN_IOS, _mpio_cache);
179 if (!m->mpio_pool) { 179 if (!m->mpio_pool) {
180 kfree(m); 180 kfree(m);
@@ -379,9 +379,10 @@ static void dispatch_queued_ios(struct multipath *m)
379 } 379 }
380} 380}
381 381
382static void process_queued_ios(void *data) 382static void process_queued_ios(struct work_struct *work)
383{ 383{
384 struct multipath *m = (struct multipath *) data; 384 struct multipath *m =
385 container_of(work, struct multipath, process_queued_ios);
385 struct hw_handler *hwh = &m->hw_handler; 386 struct hw_handler *hwh = &m->hw_handler;
386 struct pgpath *pgpath = NULL; 387 struct pgpath *pgpath = NULL;
387 unsigned init_required = 0, must_queue = 1; 388 unsigned init_required = 0, must_queue = 1;
@@ -421,9 +422,10 @@ out:
421 * An event is triggered whenever a path is taken out of use. 422 * An event is triggered whenever a path is taken out of use.
422 * Includes path failure and PG bypass. 423 * Includes path failure and PG bypass.
423 */ 424 */
424static void trigger_event(void *data) 425static void trigger_event(struct work_struct *work)
425{ 426{
426 struct multipath *m = (struct multipath *) data; 427 struct multipath *m =
428 container_of(work, struct multipath, trigger_event);
427 429
428 dm_table_event(m->ti->table); 430 dm_table_event(m->ti->table);
429} 431}
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 48a653b3f518..fc8cbb168e3e 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -883,7 +883,7 @@ static void do_mirror(struct mirror_set *ms)
883 do_writes(ms, &writes); 883 do_writes(ms, &writes);
884} 884}
885 885
886static void do_work(void *ignored) 886static void do_work(struct work_struct *ignored)
887{ 887{
888 struct mirror_set *ms; 888 struct mirror_set *ms;
889 889
@@ -1269,7 +1269,7 @@ static int __init dm_mirror_init(void)
1269 dm_dirty_log_exit(); 1269 dm_dirty_log_exit();
1270 return r; 1270 return r;
1271 } 1271 }
1272 INIT_WORK(&_kmirrord_work, do_work, NULL); 1272 INIT_WORK(&_kmirrord_work, do_work);
1273 1273
1274 r = dm_register_target(&mirror_target); 1274 r = dm_register_target(&mirror_target);
1275 if (r < 0) { 1275 if (r < 0) {
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 5281e0094072..91c7aa1fed0e 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -40,7 +40,7 @@
40#define SNAPSHOT_PAGES 256 40#define SNAPSHOT_PAGES 256
41 41
42struct workqueue_struct *ksnapd; 42struct workqueue_struct *ksnapd;
43static void flush_queued_bios(void *data); 43static void flush_queued_bios(struct work_struct *work);
44 44
45struct pending_exception { 45struct pending_exception {
46 struct exception e; 46 struct exception e;
@@ -528,7 +528,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
528 } 528 }
529 529
530 bio_list_init(&s->queued_bios); 530 bio_list_init(&s->queued_bios);
531 INIT_WORK(&s->queued_bios_work, flush_queued_bios, s); 531 INIT_WORK(&s->queued_bios_work, flush_queued_bios);
532 532
533 /* Add snapshot to the list of snapshots for this origin */ 533 /* Add snapshot to the list of snapshots for this origin */
534 /* Exceptions aren't triggered till snapshot_resume() is called */ 534 /* Exceptions aren't triggered till snapshot_resume() is called */
@@ -603,9 +603,10 @@ static void flush_bios(struct bio *bio)
603 } 603 }
604} 604}
605 605
606static void flush_queued_bios(void *data) 606static void flush_queued_bios(struct work_struct *work)
607{ 607{
608 struct dm_snapshot *s = (struct dm_snapshot *) data; 608 struct dm_snapshot *s =
609 container_of(work, struct dm_snapshot, queued_bios_work);
609 struct bio *queued_bios; 610 struct bio *queued_bios;
610 unsigned long flags; 611 unsigned long flags;
611 612
diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c
index f1db6eff4857..b3c01496c737 100644
--- a/drivers/md/kcopyd.c
+++ b/drivers/md/kcopyd.c
@@ -417,7 +417,7 @@ static int process_jobs(struct list_head *jobs, int (*fn) (struct kcopyd_job *))
417/* 417/*
418 * kcopyd does this every time it's woken up. 418 * kcopyd does this every time it's woken up.
419 */ 419 */
420static void do_work(void *ignored) 420static void do_work(struct work_struct *ignored)
421{ 421{
422 /* 422 /*
423 * The order that these are called is *very* important. 423 * The order that these are called is *very* important.
@@ -628,7 +628,7 @@ static int kcopyd_init(void)
628 } 628 }
629 629
630 kcopyd_clients++; 630 kcopyd_clients++;
631 INIT_WORK(&_kcopyd_work, do_work, NULL); 631 INIT_WORK(&_kcopyd_work, do_work);
632 mutex_unlock(&kcopyd_init_lock); 632 mutex_unlock(&kcopyd_init_lock);
633 return 0; 633 return 0;
634} 634}