aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-11-08 10:59:22 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:57 -0400
commit3ab2fb5a8cb003897016b6eb38ddad916226c1b2 (patch)
treedce5ac7ae586111c7e872193c09ced717b936549 /fs/btrfs/inode.c
parent856bf3e592f917e7d663cb7fa93e83fe795e8f4e (diff)
Btrfs: Add readpages support
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 90cb71d68294..d6d32465bc9a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1748,7 +1748,6 @@ static int btrfs_writepage(struct page *page, struct writeback_control *wbc)
1748 return extent_write_full_page(tree, page, btrfs_get_extent, wbc); 1748 return extent_write_full_page(tree, page, btrfs_get_extent, wbc);
1749} 1749}
1750 1750
1751
1752static int btrfs_writepages(struct address_space *mapping, 1751static int btrfs_writepages(struct address_space *mapping,
1753 struct writeback_control *wbc) 1752 struct writeback_control *wbc)
1754{ 1753{
@@ -1757,6 +1756,16 @@ static int btrfs_writepages(struct address_space *mapping,
1757 return extent_writepages(tree, mapping, btrfs_get_extent, wbc); 1756 return extent_writepages(tree, mapping, btrfs_get_extent, wbc);
1758} 1757}
1759 1758
1759static int
1760btrfs_readpages(struct file *file, struct address_space *mapping,
1761 struct list_head *pages, unsigned nr_pages)
1762{
1763 struct extent_map_tree *tree;
1764 tree = &BTRFS_I(mapping->host)->extent_tree;
1765 return extent_readpages(tree, mapping, pages, nr_pages,
1766 btrfs_get_extent);
1767}
1768
1760static int btrfs_releasepage(struct page *page, gfp_t unused_gfp_flags) 1769static int btrfs_releasepage(struct page *page, gfp_t unused_gfp_flags)
1761{ 1770{
1762 struct extent_map_tree *tree; 1771 struct extent_map_tree *tree;
@@ -2537,6 +2546,7 @@ static struct address_space_operations btrfs_aops = {
2537 .readpage = btrfs_readpage, 2546 .readpage = btrfs_readpage,
2538 .writepage = btrfs_writepage, 2547 .writepage = btrfs_writepage,
2539 .writepages = btrfs_writepages, 2548 .writepages = btrfs_writepages,
2549 .readpages = btrfs_readpages,
2540 .sync_page = block_sync_page, 2550 .sync_page = block_sync_page,
2541 .prepare_write = btrfs_prepare_write, 2551 .prepare_write = btrfs_prepare_write,
2542 .commit_write = btrfs_commit_write, 2552 .commit_write = btrfs_commit_write,