blob: 5c42821da2d19d7f010071b272e76147056646ab [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * include/linux/mpage.h
3 *
4 * Contains declarations related to preparing and submitting BIOS which contain
5 * multiple pagecache pages.
6 */
7
8/*
9 * (And no, it doesn't do the #ifdef __MPAGE_H thing, and it doesn't do
10 * nested includes. Get it right in the .c file).
11 */
David Howells93614012006-09-30 20:45:40 +020012#ifdef CONFIG_BLOCK
Linus Torvalds1da177e2005-04-16 15:20:36 -070013
Alex Tomas29a814d2008-07-11 19:27:31 -040014struct mpage_data {
15 struct bio *bio;
16 sector_t last_block_in_bio;
17 get_block_t *get_block;
18 unsigned use_writepage;
19};
20
Linus Torvalds1da177e2005-04-16 15:20:36 -070021struct writeback_control;
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Alex Tomas29a814d2008-07-11 19:27:31 -040023struct bio *mpage_bio_submit(int rw, struct bio *bio);
Linus Torvalds1da177e2005-04-16 15:20:36 -070024int mpage_readpages(struct address_space *mapping, struct list_head *pages,
25 unsigned nr_pages, get_block_t get_block);
26int mpage_readpage(struct page *page, get_block_t get_block);
Alex Tomas29a814d2008-07-11 19:27:31 -040027int __mpage_writepage(struct page *page, struct writeback_control *wbc,
28 void *data);
Linus Torvalds1da177e2005-04-16 15:20:36 -070029int mpage_writepages(struct address_space *mapping,
30 struct writeback_control *wbc, get_block_t get_block);
31int mpage_writepage(struct page *page, get_block_t *get_block,
32 struct writeback_control *wbc);
David Howells93614012006-09-30 20:45:40 +020033
34#endif