summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2012-03-13 09:38:00 -0400
committerChris Mason <chris.mason@oracle.com>2012-03-26 17:04:23 -0400
commit0b32f4bbb423f02acee6d43cd442f5f0775db7e0 (patch)
tree1963e5420071e70274bf77c05373dabd43bac675 /fs/btrfs/inode.c
parent5df4235ea15bd39f441ef334d8329b3d46b2cc57 (diff)
downloadop-kernel-dev-0b32f4bbb423f02acee6d43cd442f5f0775db7e0.zip
op-kernel-dev-0b32f4bbb423f02acee6d43cd442f5f0775db7e0.tar.gz
Btrfs: ensure an entire eb is written at once
This patch simplifies how we track our extent buffers. Previously we could exit writepages with only having written half of an extent buffer, which meant we had to track the state of the pages and the state of the extent buffers differently. Now we only read in entire extent buffers and write out entire extent buffers, this allows us to simply set bits in our bflags to indicate the state of the eb and we no longer have to do things like track uptodate with our iotree. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index bb26819..341a867 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6782,6 +6782,8 @@ struct inode *btrfs_alloc_inode(struct super_block *sb)
extent_map_tree_init(&ei->extent_tree);
extent_io_tree_init(&ei->io_tree, &inode->i_data);
extent_io_tree_init(&ei->io_failure_tree, &inode->i_data);
+ ei->io_tree.track_uptodate = 1;
+ ei->io_failure_tree.track_uptodate = 1;
mutex_init(&ei->log_mutex);
mutex_init(&ei->delalloc_mutex);
btrfs_ordered_inode_tree_init(&ei->ordered_tree);
OpenPOWER on IntegriCloud