On Tue, Nov 06, 2007 at 02:33:53AM -0800, akpm@linux-foundation.org wrote:
[mmotm.git] / fs / reiser4 / page_cache.h
blobb79dec70358f17e473a8c11bb27d86398917c45e
1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by
2 * reiser4/README */
3 /* Memory pressure hooks. Fake inodes handling. See page_cache.c. */
5 #if !defined(__REISER4_PAGE_CACHE_H__)
6 #define __REISER4_PAGE_CACHE_H__
8 #include "forward.h"
9 #include "context.h" /* for reiser4_ctx_gfp_mask_get() */
11 #include <linux/fs.h> /* for struct super_block, address_space */
12 #include <linux/mm.h> /* for struct page */
13 #include <linux/pagemap.h> /* for lock_page() */
14 #include <linux/vmalloc.h> /* for __vmalloc() */
16 extern int reiser4_init_formatted_fake(struct super_block *);
17 extern void reiser4_done_formatted_fake(struct super_block *);
19 extern reiser4_tree *reiser4_tree_by_page(const struct page *);
21 #define reiser4_submit_bio(rw, bio) submit_bio((rw), (bio))
23 extern void reiser4_wait_page_writeback(struct page *);
24 static inline void lock_and_wait_page_writeback(struct page *page)
26 lock_page(page);
27 if (unlikely(PageWriteback(page)))
28 reiser4_wait_page_writeback(page);
31 #define jprivate(page) ((jnode *)page_private(page))
33 extern int reiser4_page_io(struct page *, jnode *, int rw, gfp_t);
34 extern void reiser4_drop_page(struct page *);
35 extern void reiser4_invalidate_pages(struct address_space *, pgoff_t from,
36 unsigned long count, int even_cows);
37 extern void capture_reiser4_inodes(struct super_block *,
38 struct writeback_control *);
39 static inline void *reiser4_vmalloc(unsigned long size)
41 return __vmalloc(size,
42 reiser4_ctx_gfp_mask_get() | __GFP_HIGHMEM,
43 PAGE_KERNEL);
46 #define PAGECACHE_TAG_REISER4_MOVED PAGECACHE_TAG_DIRTY
48 #if REISER4_DEBUG
49 extern void print_page(const char *prefix, struct page *page);
50 #else
51 #define print_page(prf, p) noop
52 #endif
54 /* __REISER4_PAGE_CACHE_H__ */
55 #endif
57 /* Make Linus happy.
58 Local variables:
59 c-indentation-style: "K&R"
60 mode-name: "LC"
61 c-basic-offset: 8
62 tab-width: 8
63 fill-column: 120
64 scroll-step: 1
65 End: