X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=include%2Flinux%2Fwriteback.h;h=4ef4d22e5e43bb1439183aee44782fb5d46a41a3;hb=d756d10e246a01515d07f8161181b8a14afba7cc;hp=fc35e6bdfb93e4bf4d5cac5b50c983e97e846c5a;hpb=73441c665bee555526b1cf3eef603a0cff0b7e19;p=karo-tx-linux.git diff --git a/include/linux/writeback.h b/include/linux/writeback.h index fc35e6bdfb93..4ef4d22e5e43 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -4,6 +4,8 @@ #ifndef WRITEBACK_H #define WRITEBACK_H +#include + struct backing_dev_info; extern spinlock_t inode_lock; @@ -59,6 +61,8 @@ 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() */ }; /* @@ -84,7 +88,7 @@ static inline void wait_on_inode(struct inode *inode) int wakeup_pdflush(long nr_pages); void laptop_io_completion(void); void laptop_sync_completion(void); -void throttle_vm_writeout(void); +void throttle_vm_writeout(gfp_t gfp_mask); /* These are exported to sysctl. */ extern int dirty_background_ratio; @@ -109,9 +113,15 @@ 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);