aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/writeback.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r--include/linux/writeback.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index a2b84f598e2b..c66fe3332d83 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -58,7 +58,6 @@ extern const char *wb_reason_name[];
58 * in a manner such that unspecified fields are set to zero. 58 * in a manner such that unspecified fields are set to zero.
59 */ 59 */
60struct writeback_control { 60struct writeback_control {
61 enum writeback_sync_modes sync_mode;
62 long nr_to_write; /* Write this many pages, and decrement 61 long nr_to_write; /* Write this many pages, and decrement
63 this for each page written */ 62 this for each page written */
64 long pages_skipped; /* Pages which were not written */ 63 long pages_skipped; /* Pages which were not written */
@@ -71,6 +70,8 @@ struct writeback_control {
71 loff_t range_start; 70 loff_t range_start;
72 loff_t range_end; 71 loff_t range_end;
73 72
73 enum writeback_sync_modes sync_mode;
74
74 unsigned for_kupdate:1; /* A kupdate writeback */ 75 unsigned for_kupdate:1; /* A kupdate writeback */
75 unsigned for_background:1; /* A background writeback */ 76 unsigned for_background:1; /* A background writeback */
76 unsigned tagged_writepages:1; /* tag-and-write to avoid livelock */ 77 unsigned tagged_writepages:1; /* tag-and-write to avoid livelock */
@@ -94,6 +95,7 @@ long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages,
94 enum wb_reason reason); 95 enum wb_reason reason);
95long wb_do_writeback(struct bdi_writeback *wb, int force_wait); 96long wb_do_writeback(struct bdi_writeback *wb, int force_wait);
96void wakeup_flusher_threads(long nr_pages, enum wb_reason reason); 97void wakeup_flusher_threads(long nr_pages, enum wb_reason reason);
98void inode_wait_for_writeback(struct inode *inode);
97 99
98/* writeback.h requires fs.h; it, too, is not included from here. */ 100/* writeback.h requires fs.h; it, too, is not included from here. */
99static inline void wait_on_inode(struct inode *inode) 101static inline void wait_on_inode(struct inode *inode)
@@ -101,12 +103,6 @@ static inline void wait_on_inode(struct inode *inode)
101 might_sleep(); 103 might_sleep();
102 wait_on_bit(&inode->i_state, __I_NEW, inode_wait, TASK_UNINTERRUPTIBLE); 104 wait_on_bit(&inode->i_state, __I_NEW, inode_wait, TASK_UNINTERRUPTIBLE);
103} 105}
104static inline void inode_sync_wait(struct inode *inode)
105{
106 might_sleep();
107 wait_on_bit(&inode->i_state, __I_SYNC, inode_wait,
108 TASK_UNINTERRUPTIBLE);
109}
110 106
111 107
112/* 108/*
@@ -193,9 +189,4 @@ void tag_pages_for_writeback(struct address_space *mapping,
193 189
194void account_page_redirty(struct page *page); 190void account_page_redirty(struct page *page);
195 191
196/* pdflush.c */
197extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
198 read-only. */
199
200
201#endif /* WRITEBACK_H */ 192#endif /* WRITEBACK_H */