Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[safe/jmp/linux-2.6] / include / linux / writeback.h
index c6148bb..7300ecd 100644 (file)
@@ -30,7 +30,6 @@ static inline int task_is_pdflush(struct task_struct *task)
 enum writeback_sync_modes {
        WB_SYNC_NONE,   /* Don't wait on anything */
        WB_SYNC_ALL,    /* Wait on every mapping */
-       WB_SYNC_HOLD,   /* Hold the inode on sb_dirty for sys_sync() */
 };
 
 /*
@@ -62,6 +61,16 @@ 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 */
+       unsigned more_io:1;             /* more io to be dispatched */
+       /*
+        * write_cache_pages() won't update wbc->nr_to_write and
+        * mapping->writeback_index if no_nrwrite_index_update
+        * is set.  write_cache_pages() may write more than we
+        * requested and we want to make sure nr_to_write and
+        * writeback_index are updated in a consistent manner
+        * so we use a single control to update them
+        */
+       unsigned no_nrwrite_index_update:1;
 };
 
 /*
@@ -97,21 +106,38 @@ void throttle_vm_writeout(gfp_t gfp_mask);
 
 /* These are exported to sysctl. */
 extern int dirty_background_ratio;
+extern unsigned long dirty_background_bytes;
 extern int vm_dirty_ratio;
+extern unsigned long vm_dirty_bytes;
 extern int dirty_writeback_interval;
 extern int dirty_expire_interval;
+extern int vm_highmem_is_dirtyable;
 extern int block_dump;
 extern int laptop_mode;
 
+extern unsigned long determine_dirtyable_memory(void);
+
+extern int dirty_background_ratio_handler(struct ctl_table *table, int write,
+               struct file *filp, void __user *buffer, size_t *lenp,
+               loff_t *ppos);
+extern int dirty_background_bytes_handler(struct ctl_table *table, int write,
+               struct file *filp, void __user *buffer, size_t *lenp,
+               loff_t *ppos);
 extern int dirty_ratio_handler(struct ctl_table *table, int write,
                struct file *filp, void __user *buffer, size_t *lenp,
                loff_t *ppos);
+extern int dirty_bytes_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 *,
                                      void __user *, size_t *, loff_t *);
 
+void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty,
+                     unsigned long *pbdi_dirty, struct backing_dev_info *bdi);
+
 void page_writeback_init(void);
 void balance_dirty_pages_ratelimited_nr(struct address_space *mapping,
                                        unsigned long nr_pages_dirtied);