aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-04-18 04:25:42 -0400
committerNeilBrown <neilb@suse.de>2011-04-18 04:25:42 -0400
commit482c083492ddaa32ef5864bae3d143dc8bcdf7d1 (patch)
tree75017fd1a51fe945c65b3600442ddaa20b636b1a /drivers/md/md.c
parentaf1db72d8b340f97ad12b60175afdef43e6f0e60 (diff)
md - remove old plugging code.
md has some plugging infrastructure for RAID5 to use because the normal plugging infrastructure required a 'request_queue', and when called from dm, RAID5 doesn't have one of those available. This relied on the ->unplug_fn callback which doesn't exist any more. So remove all of that code, both in md and raid5. Subsequent patches with restore the plugging functionality. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index b12b3776c0c0..fb11170c717e 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -445,50 +445,6 @@ void md_flush_request(mddev_t *mddev, struct bio *bio)
445} 445}
446EXPORT_SYMBOL(md_flush_request); 446EXPORT_SYMBOL(md_flush_request);
447 447
448/* Support for plugging.
449 * This mirrors the plugging support in request_queue, but does not
450 * require having a whole queue
451 */
452static void plugger_work(struct work_struct *work)
453{
454 struct plug_handle *plug =
455 container_of(work, struct plug_handle, unplug_work);
456 plug->unplug_fn(plug);
457}
458static void plugger_timeout(unsigned long data)
459{
460 struct plug_handle *plug = (void *)data;
461 kblockd_schedule_work(NULL, &plug->unplug_work);
462}
463void plugger_init(struct plug_handle *plug,
464 void (*unplug_fn)(struct plug_handle *))
465{
466 plug->unplug_flag = 0;
467 plug->unplug_fn = unplug_fn;
468 init_timer(&plug->unplug_timer);
469 plug->unplug_timer.function = plugger_timeout;
470 plug->unplug_timer.data = (unsigned long)plug;
471 INIT_WORK(&plug->unplug_work, plugger_work);
472}
473EXPORT_SYMBOL_GPL(plugger_init);
474
475void plugger_set_plug(struct plug_handle *plug)
476{
477 if (!test_and_set_bit(PLUGGED_FLAG, &plug->unplug_flag))
478 mod_timer(&plug->unplug_timer, jiffies + msecs_to_jiffies(3)+1);
479}
480EXPORT_SYMBOL_GPL(plugger_set_plug);
481
482int plugger_remove_plug(struct plug_handle *plug)
483{
484 if (test_and_clear_bit(PLUGGED_FLAG, &plug->unplug_flag)) {
485 del_timer(&plug->unplug_timer);
486 return 1;
487 } else
488 return 0;
489}
490EXPORT_SYMBOL_GPL(plugger_remove_plug);
491
492 448
493static inline mddev_t *mddev_get(mddev_t *mddev) 449static inline mddev_t *mddev_get(mddev_t *mddev)
494{ 450{
@@ -4723,7 +4679,6 @@ static void md_clean(mddev_t *mddev)
4723 mddev->bitmap_info.chunksize = 0; 4679 mddev->bitmap_info.chunksize = 0;
4724 mddev->bitmap_info.daemon_sleep = 0; 4680 mddev->bitmap_info.daemon_sleep = 0;
4725 mddev->bitmap_info.max_write_behind = 0; 4681 mddev->bitmap_info.max_write_behind = 0;
4726 mddev->plug = NULL;
4727} 4682}
4728 4683
4729static void __md_stop_writes(mddev_t *mddev) 4684static void __md_stop_writes(mddev_t *mddev)
@@ -6688,12 +6643,6 @@ int md_allow_write(mddev_t *mddev)
6688} 6643}
6689EXPORT_SYMBOL_GPL(md_allow_write); 6644EXPORT_SYMBOL_GPL(md_allow_write);
6690 6645
6691void md_unplug(mddev_t *mddev)
6692{
6693 if (mddev->plug)
6694 mddev->plug->unplug_fn(mddev->plug);
6695}
6696
6697#define SYNC_MARKS 10 6646#define SYNC_MARKS 10
6698#define SYNC_MARK_STEP (3*HZ) 6647#define SYNC_MARK_STEP (3*HZ)
6699void md_do_sync(mddev_t *mddev) 6648void md_do_sync(mddev_t *mddev)