Skip to content

Commit

Permalink
Btrfs: Extent based page cache code. This uses an rbtree of extents a…
Browse files Browse the repository at this point in the history
…nd tests

instead of buffer heads.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason authored and David Woodhouse committed Aug 27, 2007
1 parent 83df7c1 commit a52d9a8
Show file tree
Hide file tree
Showing 9 changed files with 2,203 additions and 669 deletions.
3 changes: 2 additions & 1 deletion fs/btrfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ ifneq ($(KERNELRELEASE),)
obj-m := btrfs.o
btrfs-y := super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
hash.o file-item.o inode-item.o inode-map.o disk-io.o \
transaction.o bit-radix.o inode.o file.o tree-defrag.o
transaction.o bit-radix.o inode.o file.o tree-defrag.o \
extent_map.o

#btrfs-y := ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
# root-tree.o dir-item.o hash.o file-item.o inode-item.o \
Expand Down
3 changes: 3 additions & 0 deletions fs/btrfs/btrfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
#ifndef __BTRFS_I__
#define __BTRFS_I__

#include "extent_map.h"

/* in memory btrfs inode */
struct btrfs_inode {
struct btrfs_root *root;
struct btrfs_block_group_cache *block_group;
struct btrfs_key location;
struct extent_map_tree extent_tree;
struct inode vfs_inode;

/*
Expand Down
7 changes: 7 additions & 0 deletions fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,14 @@ int btrfs_commit_write(struct file *file, struct page *page,
unsigned from, unsigned to);
int btrfs_get_block(struct inode *inode, sector_t iblock,
struct buffer_head *result, int create);
struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page,
size_t page_offset, u64 start, u64 end,
int create);
int btrfs_update_inode(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct inode *inode);
/* file.c */
int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end);
extern struct file_operations btrfs_file_operations;
int btrfs_drop_extents(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct inode *inode,
Expand Down
1 change: 0 additions & 1 deletion fs/btrfs/disk-io.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ int btrfs_insert_dev_radix(struct btrfs_root *root,
u64 num_blocks);
int btrfs_map_bh_to_logical(struct btrfs_root *root, struct buffer_head *bh,
u64 logical);
int btrfs_releasepage(struct page *page, gfp_t flags);
void btrfs_btree_balance_dirty(struct btrfs_root *root);
int btrfs_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root);
void btrfs_mark_buffer_dirty(struct buffer_head *bh);
Expand Down
Loading

0 comments on commit a52d9a8

Please sign in to comment.