summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-07-31 09:08:15 +0200
committerJens Axboe <axboe@kernel.dk>2012-07-31 09:08:15 +0200
commit74018dc3063a2c729fc73041c0a9f03aac995920 (patch)
tree03f01bca3a2d9f7cf31785fbe74e9ab76bb0d4cd /drivers/md
parent2a7d5559b346574057dce4672d1ed9aaa9d1e685 (diff)
blk: pass from_schedule to non-request unplug functions.
This will allow md/raid to know why the unplug was called, and will be able to act according - if !from_schedule it is safe to perform tasks which could themselves schedule. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c2
-rw-r--r--drivers/md/md.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index b493fa41738..db02d2efb76 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -498,7 +498,7 @@ void md_flush_request(struct mddev *mddev, struct bio *bio)
}
EXPORT_SYMBOL(md_flush_request);
-void md_unplug(struct blk_plug_cb *cb)
+void md_unplug(struct blk_plug_cb *cb, bool from_schedule)
{
struct mddev *mddev = cb->data;
md_wakeup_thread(mddev->thread);
diff --git a/drivers/md/md.h b/drivers/md/md.h
index 8f998e08fb8..f385b038589 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -629,7 +629,7 @@ extern struct bio *bio_alloc_mddev(gfp_t gfp_mask, int nr_iovecs,
struct mddev *mddev);
extern void md_trim_bio(struct bio *bio, int offset, int size);
-extern void md_unplug(struct blk_plug_cb *cb);
+extern void md_unplug(struct blk_plug_cb *cb, bool from_schedule);
static inline int mddev_check_plugged(struct mddev *mddev)
{
return !!blk_check_plugged(md_unplug, mddev,