disk-io.c (d571976292839cec05a2820b08f7629b145ed157) disk-io.c (df2ce34c8801af8e00c7f82435fcb1e4b45a2759)
1#include <linux/module.h>
2#include <linux/fs.h>
3#include "ctree.h"
4#include "disk-io.h"
5#include "transaction.h"
6
7static int check_tree_block(struct btrfs_root *root, struct buffer_head *buf)
8{
9 struct btrfs_node *node = btrfs_buffer_node(buf);
10 if (buf->b_blocknr != btrfs_header_blocknr(&node->header))
11 BUG();
12 if (root->node && btrfs_header_parentid(&node->header) !=
1#include <linux/module.h>
2#include <linux/fs.h>
3#include "ctree.h"
4#include "disk-io.h"
5#include "transaction.h"
6
7static int check_tree_block(struct btrfs_root *root, struct buffer_head *buf)
8{
9 struct btrfs_node *node = btrfs_buffer_node(buf);
10 if (buf->b_blocknr != btrfs_header_blocknr(&node->header))
11 BUG();
12 if (root->node && btrfs_header_parentid(&node->header) !=
13 btrfs_header_parentid(btrfs_buffer_header(root->node)))
14 BUG();
13 btrfs_header_parentid(btrfs_buffer_header(root->node))) {
14 printk("block %Lu parentids don't match buf %Lu, root %Lu\n",
15 buf->b_blocknr,
16 btrfs_header_parentid(&node->header),
17 btrfs_header_parentid(btrfs_buffer_header(root->node)));
18 WARN_ON(1);
19 }
15 return 0;
16}
17
18struct buffer_head *alloc_tree_block(struct btrfs_root *root, u64 blocknr)
19{
20 return sb_getblk(root->fs_info->sb, blocknr);
21}
22

--- 181 unchanged lines hidden ---
20 return 0;
21}
22
23struct buffer_head *alloc_tree_block(struct btrfs_root *root, u64 blocknr)
24{
25 return sb_getblk(root->fs_info->sb, blocknr);
26}
27

--- 181 unchanged lines hidden ---