Btrfs: directory readahead

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2007-05-01 08:53:32 -04:00
committed by David Woodhouse
parent 31f3c99b73
commit 090d18753c
4 changed files with 63 additions and 1 deletions

View File

@@ -5,6 +5,11 @@
#define BTRFS_SUPER_INFO_OFFSET (16 * 1024)
enum btrfs_bh_state_bits {
BH_Checked = BH_PrivateStart,
};
BUFFER_FNS(Checked, checked);
static inline struct btrfs_node *btrfs_buffer_node(struct buffer_head *bh)
{
return (struct btrfs_node *)bh->b_data;
@@ -21,6 +26,7 @@ static inline struct btrfs_header *btrfs_buffer_header(struct buffer_head *bh)
}
struct buffer_head *read_tree_block(struct btrfs_root *root, u64 blocknr);
int readahead_tree_block(struct btrfs_root *root, u64 blocknr);
struct buffer_head *btrfs_find_create_tree_block(struct btrfs_root *root,
u64 blocknr);
int write_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root,