diff options
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r-- | include/linux/writeback.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 66ebddcff664..36520ded3e06 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -34,6 +34,9 @@ struct writeback_control { | |||
34 | enum writeback_sync_modes sync_mode; | 34 | enum writeback_sync_modes sync_mode; |
35 | unsigned long *older_than_this; /* If !NULL, only write back inodes | 35 | unsigned long *older_than_this; /* If !NULL, only write back inodes |
36 | older than this */ | 36 | older than this */ |
37 | unsigned long wb_start; /* Time writeback_inodes_wb was | ||
38 | called. This is needed to avoid | ||
39 | extra jobs and livelock */ | ||
37 | long nr_to_write; /* Write this many pages, and decrement | 40 | long nr_to_write; /* Write this many pages, and decrement |
38 | this for each page written */ | 41 | this for each page written */ |
39 | long pages_skipped; /* Pages which were not written */ | 42 | long pages_skipped; /* Pages which were not written */ |
@@ -49,6 +52,7 @@ struct writeback_control { | |||
49 | unsigned nonblocking:1; /* Don't get stuck on request queues */ | 52 | unsigned nonblocking:1; /* Don't get stuck on request queues */ |
50 | unsigned encountered_congestion:1; /* An output: a queue is full */ | 53 | unsigned encountered_congestion:1; /* An output: a queue is full */ |
51 | unsigned for_kupdate:1; /* A kupdate writeback */ | 54 | unsigned for_kupdate:1; /* A kupdate writeback */ |
55 | unsigned for_background:1; /* A background writeback */ | ||
52 | unsigned for_reclaim:1; /* Invoked from the page allocator */ | 56 | unsigned for_reclaim:1; /* Invoked from the page allocator */ |
53 | unsigned range_cyclic:1; /* range_start is cyclic */ | 57 | unsigned range_cyclic:1; /* range_start is cyclic */ |
54 | unsigned more_io:1; /* more io to be dispatched */ | 58 | unsigned more_io:1; /* more io to be dispatched */ |
@@ -69,6 +73,7 @@ struct writeback_control { | |||
69 | struct bdi_writeback; | 73 | struct bdi_writeback; |
70 | int inode_wait(void *); | 74 | int inode_wait(void *); |
71 | void writeback_inodes_sb(struct super_block *); | 75 | void writeback_inodes_sb(struct super_block *); |
76 | int writeback_inodes_sb_if_idle(struct super_block *); | ||
72 | void sync_inodes_sb(struct super_block *); | 77 | void sync_inodes_sb(struct super_block *); |
73 | void writeback_inodes_wbc(struct writeback_control *wbc); | 78 | void writeback_inodes_wbc(struct writeback_control *wbc); |
74 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); | 79 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); |
@@ -78,8 +83,7 @@ void wakeup_flusher_threads(long nr_pages); | |||
78 | static inline void wait_on_inode(struct inode *inode) | 83 | static inline void wait_on_inode(struct inode *inode) |
79 | { | 84 | { |
80 | might_sleep(); | 85 | might_sleep(); |
81 | wait_on_bit(&inode->i_state, __I_LOCK, inode_wait, | 86 | wait_on_bit(&inode->i_state, __I_NEW, inode_wait, TASK_UNINTERRUPTIBLE); |
82 | TASK_UNINTERRUPTIBLE); | ||
83 | } | 87 | } |
84 | static inline void inode_sync_wait(struct inode *inode) | 88 | static inline void inode_sync_wait(struct inode *inode) |
85 | { | 89 | { |