diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-06-18 09:57:58 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-06-18 09:57:58 -0400 |
commit | 8c2383c3dd2cb5bb39598ce4fa97154bc591020a (patch) | |
tree | 68a9c491bfa19d572dca6b41e5dde7f05165c270 /fs/btrfs/print-tree.c | |
parent | 9ebefb180bad4914a31c4e1748ba187a30e1e990 (diff) |
Subject: Rework btrfs_file_write to only allocate while page locks are held
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r-- | fs/btrfs/print-tree.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index 1fa705683008..e66acd4e2745 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c | |||
@@ -31,6 +31,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l) | |||
31 | struct btrfs_dir_item *di; | 31 | struct btrfs_dir_item *di; |
32 | struct btrfs_inode_item *ii; | 32 | struct btrfs_inode_item *ii; |
33 | struct btrfs_block_group_item *bi; | 33 | struct btrfs_block_group_item *bi; |
34 | struct btrfs_file_extent_item *fi; | ||
34 | u32 type; | 35 | u32 type; |
35 | 36 | ||
36 | printk("leaf %llu total ptrs %d free space %d\n", | 37 | printk("leaf %llu total ptrs %d free space %d\n", |
@@ -75,6 +76,23 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l) | |||
75 | printk("\t\textent data refs %u\n", | 76 | printk("\t\textent data refs %u\n", |
76 | btrfs_extent_refs(ei)); | 77 | btrfs_extent_refs(ei)); |
77 | break; | 78 | break; |
79 | |||
80 | case BTRFS_EXTENT_DATA_KEY: | ||
81 | fi = btrfs_item_ptr(l, i, | ||
82 | struct btrfs_file_extent_item); | ||
83 | if (btrfs_file_extent_type(fi) == | ||
84 | BTRFS_FILE_EXTENT_INLINE) { | ||
85 | printk("\t\tinline extent data size %u\n", | ||
86 | btrfs_file_extent_inline_len(l->items + i)); | ||
87 | break; | ||
88 | } | ||
89 | printk("\t\textent data disk block %llu nr %llu\n", | ||
90 | (unsigned long long)btrfs_file_extent_disk_blocknr(fi), | ||
91 | (unsigned long long)btrfs_file_extent_disk_num_blocks(fi)); | ||
92 | printk("\t\textent data offset %llu nr %llu\n", | ||
93 | (unsigned long long)btrfs_file_extent_offset(fi), | ||
94 | (unsigned long long)btrfs_file_extent_num_blocks(fi)); | ||
95 | break; | ||
78 | case BTRFS_BLOCK_GROUP_ITEM_KEY: | 96 | case BTRFS_BLOCK_GROUP_ITEM_KEY: |
79 | bi = btrfs_item_ptr(l, i, | 97 | bi = btrfs_item_ptr(l, i, |
80 | struct btrfs_block_group_item); | 98 | struct btrfs_block_group_item); |