diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-10-15 16:17:04 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:56 -0400 |
commit | 09e71a326341f40111400c88aaf0498ef622824b (patch) | |
tree | 82e8f8a412a4403155fe17399456d2f8898715c0 /fs/btrfs/disk-io.c | |
parent | 14048ed0c415b8729b194e92c16d31c61628d216 (diff) |
Btrfs: Use an array of pages in the extent buffers to reduce the cost of find_get_page
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index fad9298c6962..0636f79672e9 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -647,20 +647,20 @@ int close_ctree(struct btrfs_root *root) | |||
647 | 647 | ||
648 | int btrfs_buffer_uptodate(struct extent_buffer *buf) | 648 | int btrfs_buffer_uptodate(struct extent_buffer *buf) |
649 | { | 649 | { |
650 | struct inode *btree_inode = buf->first_page->mapping->host; | 650 | struct inode *btree_inode = buf->pages[0]->mapping->host; |
651 | return extent_buffer_uptodate(&BTRFS_I(btree_inode)->extent_tree, buf); | 651 | return extent_buffer_uptodate(&BTRFS_I(btree_inode)->extent_tree, buf); |
652 | } | 652 | } |
653 | 653 | ||
654 | int btrfs_set_buffer_uptodate(struct extent_buffer *buf) | 654 | int btrfs_set_buffer_uptodate(struct extent_buffer *buf) |
655 | { | 655 | { |
656 | struct inode *btree_inode = buf->first_page->mapping->host; | 656 | struct inode *btree_inode = buf->pages[0]->mapping->host; |
657 | return set_extent_buffer_uptodate(&BTRFS_I(btree_inode)->extent_tree, | 657 | return set_extent_buffer_uptodate(&BTRFS_I(btree_inode)->extent_tree, |
658 | buf); | 658 | buf); |
659 | } | 659 | } |
660 | 660 | ||
661 | void btrfs_mark_buffer_dirty(struct extent_buffer *buf) | 661 | void btrfs_mark_buffer_dirty(struct extent_buffer *buf) |
662 | { | 662 | { |
663 | struct btrfs_root *root = BTRFS_I(buf->first_page->mapping->host)->root; | 663 | struct btrfs_root *root = BTRFS_I(buf->pages[0]->mapping->host)->root; |
664 | u64 transid = btrfs_header_generation(buf); | 664 | u64 transid = btrfs_header_generation(buf); |
665 | struct inode *btree_inode = root->fs_info->btree_inode; | 665 | struct inode *btree_inode = root->fs_info->btree_inode; |
666 | 666 | ||