summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h14
-rw-r--r--include/linux/fs.h1
-rw-r--r--include/linux/tqueue.h2
3 files changed, 12 insertions, 5 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index bfdb755f261f..b9972fe4fc70 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -8,6 +8,7 @@
#include <linux/list.h>
#include <linux/pagemap.h>
#include <linux/backing-dev.h>
+#include <linux/interrupt.h>
#include <asm/scatterlist.h>
@@ -136,6 +137,11 @@ struct blk_queue_tag {
int max_depth;
};
+struct blk_plug {
+ struct list_head list;
+ struct tasklet_struct task;
+};
+
/*
* Default nr free requests per queue, ll_rw_blk will scale it down
* according to available RAM at init time
@@ -177,10 +183,7 @@ struct request_queue
unsigned long bounce_pfn;
int bounce_gfp;
- /*
- * This is used to remove the plug when tq_disk runs.
- */
- struct tq_struct plug_tq;
+ struct blk_plug plug;
/*
* various queue flags, see QUEUE_* below
@@ -217,6 +220,7 @@ struct request_queue
#define QUEUE_FLAG_PLUGGED 0 /* queue is plugged */
#define QUEUE_FLAG_CLUSTER 1 /* cluster several segments into 1 */
#define QUEUE_FLAG_QUEUED 2 /* uses generic tag queueing */
+#define QUEUE_FLAG_STOPPED 3 /* queue is stopped */
#define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)
#define blk_mark_plugged(q) set_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)
@@ -303,6 +307,8 @@ extern void blk_recount_segments(request_queue_t *, struct bio *);
extern inline int blk_phys_contig_segment(request_queue_t *q, struct bio *, struct bio *);
extern inline int blk_hw_contig_segment(request_queue_t *q, struct bio *, struct bio *);
extern int block_ioctl(struct block_device *, unsigned int, unsigned long);
+extern void blk_start_queue(request_queue_t *q);
+extern void blk_stop_queue(request_queue_t *q);
/*
* get ready for proper ref counting
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0c7ec5ff6b9c..01965a87cc4a 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1079,6 +1079,7 @@ extern int blkdev_get(struct block_device *, mode_t, unsigned, int);
extern int blkdev_put(struct block_device *, int);
extern int bd_claim(struct block_device *, void *);
extern void bd_release(struct block_device *);
+extern void blk_run_queues(void);
/* fs/devices.c */
extern const struct block_device_operations *get_blkfops(unsigned int);
diff --git a/include/linux/tqueue.h b/include/linux/tqueue.h
index 516108dcdbbf..a325ce1792c5 100644
--- a/include/linux/tqueue.h
+++ b/include/linux/tqueue.h
@@ -66,7 +66,7 @@ typedef struct list_head task_queue;
#define DECLARE_TASK_QUEUE(q) LIST_HEAD(q)
#define TQ_ACTIVE(q) (!list_empty(&q))
-extern task_queue tq_timer, tq_immediate, tq_disk, tq_bdflush;
+extern task_queue tq_timer, tq_immediate, tq_bdflush;
/*
* To implement your own list of active bottom halfs, use the following