1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by
3 /* Memory pressure hooks. Fake inodes handling. See page_cache.c. */
5 #if !defined(__REISER4_PAGE_CACHE_H__)
6 #define __REISER4_PAGE_CACHE_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
)
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
,
46 #define PAGECACHE_TAG_REISER4_MOVED PAGECACHE_TAG_DIRTY
49 extern void print_page(const char *prefix
, struct page
*page
);
51 #define print_page(prf, p) noop
54 /* __REISER4_PAGE_CACHE_H__ */
59 c-indentation-style: "K&R"