]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/writeback.h
fs/reiserfs/: cleanups
[karo-tx-linux.git] / include / linux / writeback.h
index daa6c125f66e937e26884aeaeabab2b4525f72c0..52be879793ed9213058efb7a0f4c18788be6de63 100644 (file)
@@ -4,6 +4,9 @@
 #ifndef WRITEBACK_H
 #define WRITEBACK_H
 
+#include <linux/sched.h>
+#include <linux/fs.h>
+
 struct backing_dev_info;
 
 extern spinlock_t inode_lock;
@@ -59,8 +62,6 @@ struct writeback_control {
        unsigned for_reclaim:1;         /* Invoked from the page allocator */
        unsigned for_writepages:1;      /* This is a writepages() call */
        unsigned range_cyclic:1;        /* range_start is cyclic */
-
-       void *fs_private;               /* For use by ->writepages() */
 };
 
 /*
@@ -96,6 +97,10 @@ extern int dirty_expire_interval;
 extern int block_dump;
 extern int laptop_mode;
 
+extern int dirty_ratio_handler(struct ctl_table *table, int write,
+               struct file *filp, void __user *buffer, size_t *lenp,
+               loff_t *ppos);
+
 struct ctl_table;
 struct file;
 int dirty_writeback_centisecs_handler(struct ctl_table *, int, struct file *,
@@ -111,15 +116,21 @@ balance_dirty_pages_ratelimited(struct address_space *mapping)
        balance_dirty_pages_ratelimited_nr(mapping, 1);
 }
 
+typedef int (*writepage_t)(struct page *page, struct writeback_control *wbc,
+                               void *data);
+
 int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0);
-extern int generic_writepages(struct address_space *mapping,
-                             struct writeback_control *wbc);
+int generic_writepages(struct address_space *mapping,
+                      struct writeback_control *wbc);
+int write_cache_pages(struct address_space *mapping,
+                     struct writeback_control *wbc, writepage_t writepage,
+                     void *data);
 int do_writepages(struct address_space *mapping, struct writeback_control *wbc);
 int sync_page_range(struct inode *inode, struct address_space *mapping,
                        loff_t pos, loff_t count);
 int sync_page_range_nolock(struct inode *inode, struct address_space *mapping,
                           loff_t pos, loff_t count);
-void set_page_dirty_balance(struct page *page);
+void set_page_dirty_balance(struct page *page, int page_mkwrite);
 void writeback_set_ratelimit(void);
 
 /* pdflush.c */