diff options
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index c84ec68eaec9..388e70601413 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -151,6 +151,7 @@ enum { | |||
151 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ | 151 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ |
152 | SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */ | 152 | SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */ |
153 | SWP_BLKDEV = (1 << 6), /* its a block device */ | 153 | SWP_BLKDEV = (1 << 6), /* its a block device */ |
154 | SWP_FILE = (1 << 7), /* set after swap_activate success */ | ||
154 | /* add others here before... */ | 155 | /* add others here before... */ |
155 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ | 156 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ |
156 | }; | 157 | }; |
@@ -301,7 +302,7 @@ static inline void scan_unevictable_unregister_node(struct node *node) | |||
301 | 302 | ||
302 | extern int kswapd_run(int nid); | 303 | extern int kswapd_run(int nid); |
303 | extern void kswapd_stop(int nid); | 304 | extern void kswapd_stop(int nid); |
304 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 305 | #ifdef CONFIG_MEMCG |
305 | extern int mem_cgroup_swappiness(struct mem_cgroup *mem); | 306 | extern int mem_cgroup_swappiness(struct mem_cgroup *mem); |
306 | #else | 307 | #else |
307 | static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) | 308 | static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) |
@@ -309,7 +310,7 @@ static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) | |||
309 | return vm_swappiness; | 310 | return vm_swappiness; |
310 | } | 311 | } |
311 | #endif | 312 | #endif |
312 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 313 | #ifdef CONFIG_MEMCG_SWAP |
313 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); | 314 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); |
314 | #else | 315 | #else |
315 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | 316 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) |
@@ -320,8 +321,14 @@ static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | |||
320 | /* linux/mm/page_io.c */ | 321 | /* linux/mm/page_io.c */ |
321 | extern int swap_readpage(struct page *); | 322 | extern int swap_readpage(struct page *); |
322 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); | 323 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); |
324 | extern int swap_set_page_dirty(struct page *page); | ||
323 | extern void end_swap_bio_read(struct bio *bio, int err); | 325 | extern void end_swap_bio_read(struct bio *bio, int err); |
324 | 326 | ||
327 | int add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, | ||
328 | unsigned long nr_pages, sector_t start_block); | ||
329 | int generic_swapfile_activate(struct swap_info_struct *, struct file *, | ||
330 | sector_t *); | ||
331 | |||
325 | /* linux/mm/swap_state.c */ | 332 | /* linux/mm/swap_state.c */ |
326 | extern struct address_space swapper_space; | 333 | extern struct address_space swapper_space; |
327 | #define total_swapcache_pages swapper_space.nrpages | 334 | #define total_swapcache_pages swapper_space.nrpages |
@@ -356,11 +363,12 @@ extern unsigned int count_swap_pages(int, int); | |||
356 | extern sector_t map_swap_page(struct page *, struct block_device **); | 363 | extern sector_t map_swap_page(struct page *, struct block_device **); |
357 | extern sector_t swapdev_block(int, pgoff_t); | 364 | extern sector_t swapdev_block(int, pgoff_t); |
358 | extern int page_swapcount(struct page *); | 365 | extern int page_swapcount(struct page *); |
366 | extern struct swap_info_struct *page_swap_info(struct page *); | ||
359 | extern int reuse_swap_page(struct page *); | 367 | extern int reuse_swap_page(struct page *); |
360 | extern int try_to_free_swap(struct page *); | 368 | extern int try_to_free_swap(struct page *); |
361 | struct backing_dev_info; | 369 | struct backing_dev_info; |
362 | 370 | ||
363 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 371 | #ifdef CONFIG_MEMCG |
364 | extern void | 372 | extern void |
365 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); | 373 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); |
366 | #else | 374 | #else |