summaryrefslogtreecommitdiffstats
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 0c65141b999..25f32d7c7ee 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)
return extent_write_full_page(tree, page, btrfs_get_extent, wbc);
}
+
+static int btrfs_writepages(struct address_space *mapping,
+ struct writeback_control *wbc)
+{
+ struct extent_map_tree *tree;
+ tree = &BTRFS_I(mapping->host)->extent_tree;
+ return extent_writepages(tree, mapping, btrfs_get_extent, wbc);
+}
+
static int btrfs_releasepage(struct page *page, gfp_t unused_gfp_flags)
{
struct extent_map_tree *tree;
@@ -2526,6 +2535,7 @@ static struct extent_map_ops btrfs_extent_map_ops = {
static struct address_space_operations btrfs_aops = {
.readpage = btrfs_readpage,
.writepage = btrfs_writepage,
+ .writepages = btrfs_writepages,
.sync_page = block_sync_page,
.prepare_write = btrfs_prepare_write,
.commit_write = btrfs_commit_write,