btrfsprogs/0014-btrfs-progs-fix-wrong-extent-buffer-size-when-readin.patch
Dirk Mueller a0e284e535 - add support for currently available kernel features:
- add scrub subcommand
  - scan /proc/partitions by default (or use --all-devices for all)
  - mkfs fixes and improvements
  - documentation fixes

- update from git:
  - add btrfs-select-super utility
  - add btrfs-label utility
  - allow mixed data+metadata (option --mixed)
  - allow populating new filesystem with files (option --rootdir)
  - allow discard support in mkfs
  - lzo support
  - deprecate 'btrfsctl' 'btrfs-vol' 'btrfs-show'
  - other bugfixes and documentation improvements

OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=104
2011-07-13 14:48:36 +00:00

34 lines
1.0 KiB
Diff

From 32ba8209276d3ac1723ea6373aaec9d6399ce5ca Mon Sep 17 00:00:00 2001
From: Miao Xie <miaox@cn.fujitsu.com>
Date: Tue, 13 Jul 2010 09:18:04 +0000
Subject: [PATCH 14/15] btrfs-progs: fix wrong extent buffer size when reading
tree block
the root extent buffer of a tree may not be a leaf, so we must get the right
size by its level when reading it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
---
debug-tree.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/debug-tree.c b/debug-tree.c
index 0525354..99c12d6 100644
--- a/debug-tree.c
+++ b/debug-tree.c
@@ -212,7 +212,9 @@ again:
read_extent_buffer(leaf, &ri, offset, sizeof(ri));
buf = read_tree_block(tree_root_scan,
btrfs_root_bytenr(&ri),
- tree_root_scan->leafsize, 0);
+ btrfs_level_size(tree_root_scan,
+ btrfs_root_level(&ri)),
+ 0);
switch(found_key.objectid) {
case BTRFS_ROOT_TREE_OBJECTID:
if (!skip)
--
1.7.5.2.353.g5df3e