diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/backing-dev.h | 7 | ||||
-rw-r--r-- | include/linux/blkdev.h | 24 | ||||
-rw-r--r-- | include/linux/writeback.h | 1 |
3 files changed, 27 insertions, 5 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index f7a1390d67f5..7011d6255593 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -10,6 +10,8 @@ | |||
10 | 10 | ||
11 | #include <asm/atomic.h> | 11 | #include <asm/atomic.h> |
12 | 12 | ||
13 | struct page; | ||
14 | |||
13 | /* | 15 | /* |
14 | * Bits in backing_dev_info.state | 16 | * Bits in backing_dev_info.state |
15 | */ | 17 | */ |
@@ -88,6 +90,11 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi) | |||
88 | (1 << BDI_write_congested)); | 90 | (1 << BDI_write_congested)); |
89 | } | 91 | } |
90 | 92 | ||
93 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); | ||
94 | void set_bdi_congested(struct backing_dev_info *bdi, int rw); | ||
95 | long congestion_wait(int rw, long timeout); | ||
96 | void congestion_end(int rw); | ||
97 | |||
91 | #define bdi_cap_writeback_dirty(bdi) \ | 98 | #define bdi_cap_writeback_dirty(bdi) \ |
92 | (!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK)) | 99 | (!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK)) |
93 | 100 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 9575e3a5ff2a..7bfcde2d5578 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -651,8 +651,26 @@ extern void blk_recount_segments(request_queue_t *, struct bio *); | |||
651 | extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *); | 651 | extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *); |
652 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, | 652 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, |
653 | struct gendisk *, struct scsi_ioctl_command __user *); | 653 | struct gendisk *, struct scsi_ioctl_command __user *); |
654 | extern void blk_clear_queue_congested(request_queue_t *q, int rw); | 654 | |
655 | extern void blk_set_queue_congested(request_queue_t *q, int rw); | 655 | /* |
656 | * A queue has just exitted congestion. Note this in the global counter of | ||
657 | * congested queues, and wake up anyone who was waiting for requests to be | ||
658 | * put back. | ||
659 | */ | ||
660 | static inline void blk_clear_queue_congested(request_queue_t *q, int rw) | ||
661 | { | ||
662 | clear_bdi_congested(&q->backing_dev_info, rw); | ||
663 | } | ||
664 | |||
665 | /* | ||
666 | * A queue has just entered congestion. Flag that in the queue's VM-visible | ||
667 | * state flags and increment the global gounter of congested queues. | ||
668 | */ | ||
669 | static inline void blk_set_queue_congested(request_queue_t *q, int rw) | ||
670 | { | ||
671 | set_bdi_congested(&q->backing_dev_info, rw); | ||
672 | } | ||
673 | |||
656 | extern void blk_start_queue(request_queue_t *q); | 674 | extern void blk_start_queue(request_queue_t *q); |
657 | extern void blk_stop_queue(request_queue_t *q); | 675 | extern void blk_stop_queue(request_queue_t *q); |
658 | extern void blk_sync_queue(struct request_queue *q); | 676 | extern void blk_sync_queue(struct request_queue *q); |
@@ -767,10 +785,8 @@ extern int blk_queue_init_tags(request_queue_t *, int, struct blk_queue_tag *); | |||
767 | extern void blk_queue_free_tags(request_queue_t *); | 785 | extern void blk_queue_free_tags(request_queue_t *); |
768 | extern int blk_queue_resize_tags(request_queue_t *, int); | 786 | extern int blk_queue_resize_tags(request_queue_t *, int); |
769 | extern void blk_queue_invalidate_tags(request_queue_t *); | 787 | extern void blk_queue_invalidate_tags(request_queue_t *); |
770 | extern long blk_congestion_wait(int rw, long timeout); | ||
771 | extern struct blk_queue_tag *blk_init_tags(int); | 788 | extern struct blk_queue_tag *blk_init_tags(int); |
772 | extern void blk_free_tags(struct blk_queue_tag *); | 789 | extern void blk_free_tags(struct blk_queue_tag *); |
773 | extern void blk_congestion_end(int rw); | ||
774 | 790 | ||
775 | static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt, | 791 | static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt, |
776 | int tag) | 792 | int tag) |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index a341c8032866..fc35e6bdfb93 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -85,7 +85,6 @@ int wakeup_pdflush(long nr_pages); | |||
85 | void laptop_io_completion(void); | 85 | void laptop_io_completion(void); |
86 | void laptop_sync_completion(void); | 86 | void laptop_sync_completion(void); |
87 | void throttle_vm_writeout(void); | 87 | void throttle_vm_writeout(void); |
88 | void writeback_congestion_end(void); | ||
89 | 88 | ||
90 | /* These are exported to sysctl. */ | 89 | /* These are exported to sysctl. */ |
91 | extern int dirty_background_ratio; | 90 | extern int dirty_background_ratio; |