diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-09-16 09:13:54 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-09-16 09:18:52 -0400 |
commit | b6e51316daede0633e9274e1e30391cfa4747877 (patch) | |
tree | 664476bb4e7c05dcce3ad908363b482134c68429 /include/linux | |
parent | bcddc3f01c9122882c8b9f12ab94a934e55aef97 (diff) |
writeback: separate starting of sync vs opportunistic writeback
bdi_start_writeback() is currently split into two paths, one for
WB_SYNC_NONE and one for WB_SYNC_ALL. Add bdi_sync_writeback()
for WB_SYNC_ALL writeback and let bdi_start_writeback() handle
only WB_SYNC_NONE.
Push down the writeback_control allocation and only accept the
parameters that make sense for each function. This cleans up
the API considerably.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/backing-dev.h | 2 | ||||
-rw-r--r-- | include/linux/writeback.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 859e797f4576..0ee33c2e6129 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -101,7 +101,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |||
101 | const char *fmt, ...); | 101 | const char *fmt, ...); |
102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); | 102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); |
103 | void bdi_unregister(struct backing_dev_info *bdi); | 103 | void bdi_unregister(struct backing_dev_info *bdi); |
104 | void bdi_start_writeback(struct writeback_control *wbc); | 104 | void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages); |
105 | int bdi_writeback_task(struct bdi_writeback *wb); | 105 | int bdi_writeback_task(struct bdi_writeback *wb); |
106 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 106 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
107 | 107 | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 48a054e2b716..75cf58666ff9 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -68,8 +68,8 @@ struct writeback_control { | |||
68 | */ | 68 | */ |
69 | struct bdi_writeback; | 69 | struct bdi_writeback; |
70 | int inode_wait(void *); | 70 | int inode_wait(void *); |
71 | long writeback_inodes_sb(struct super_block *); | 71 | void writeback_inodes_sb(struct super_block *); |
72 | long sync_inodes_sb(struct super_block *); | 72 | void sync_inodes_sb(struct super_block *); |
73 | void writeback_inodes_wbc(struct writeback_control *wbc); | 73 | void writeback_inodes_wbc(struct writeback_control *wbc); |
74 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); | 74 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); |
75 | void wakeup_flusher_threads(long nr_pages); | 75 | void wakeup_flusher_threads(long nr_pages); |