aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-11-01 19:45:34 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:57 -0400
commitb293f02e1423f2099744f3ade23ddd83b65321fc (patch)
tree6cac2c422ce3ccde9cf7f6f29c62e045365cb3cb /fs/btrfs/inode.c
parent944746ec7575258475958d858cdf3a0e4c8f7b9e (diff)
Btrfs: Add writepages support
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 0c65141b9993..25f32d7c7ee8 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1747,6 +1747,15 @@ static int btrfs_writepage(struct page *page, struct writeback_control *wbc)
1747 return extent_write_full_page(tree, page, btrfs_get_extent, wbc); 1747 return extent_write_full_page(tree, page, btrfs_get_extent, wbc);
1748} 1748}
1749 1749
1750
1751static int btrfs_writepages(struct address_space *mapping,
1752 struct writeback_control *wbc)
1753{
1754 struct extent_map_tree *tree;
1755 tree = &BTRFS_I(mapping->host)->extent_tree;
1756 return extent_writepages(tree, mapping, btrfs_get_extent, wbc);
1757}
1758
1750static int btrfs_releasepage(struct page *page, gfp_t unused_gfp_flags) 1759static int btrfs_releasepage(struct page *page, gfp_t unused_gfp_flags)
1751{ 1760{
1752 struct extent_map_tree *tree; 1761 struct extent_map_tree *tree;
@@ -2526,6 +2535,7 @@ static struct extent_map_ops btrfs_extent_map_ops = {
2526static struct address_space_operations btrfs_aops = { 2535static struct address_space_operations btrfs_aops = {
2527 .readpage = btrfs_readpage, 2536 .readpage = btrfs_readpage,
2528 .writepage = btrfs_writepage, 2537 .writepage = btrfs_writepage,
2538 .writepages = btrfs_writepages,
2529 .sync_page = block_sync_page, 2539 .sync_page = block_sync_page,
2530 .prepare_write = btrfs_prepare_write, 2540 .prepare_write = btrfs_prepare_write,
2531 .commit_write = btrfs_commit_write, 2541 .commit_write = btrfs_commit_write,