summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-08-04 08:20:15 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:06 -0400
commit2dd3e67b1eaec8504da7e12b8afee77323a49f38 (patch)
tree794035de0243b20cda0fdf571e2ed02f29aa962e /fs/btrfs/disk-io.c
parent65b51a009e29e64c0951f21ea17fdc66bbb0fbd7 (diff)
downloadlwn-2dd3e67b1eaec8504da7e12b8afee77323a49f38.tar.gz
lwn-2dd3e67b1eaec8504da7e12b8afee77323a49f38.zip
Btrfs: More throttle tuning
* Make walk_down_tree wake up throttled tasks more often * Make walk_down_tree call cond_resched during long loops * As the size of the ref cache grows, wait longer in throttle * Get rid of the reada code in walk_down_tree, the leaves don't get read anymore, thanks to the ref cache. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index d2d1cc87e8ad..da9dda4338a3 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -188,13 +188,6 @@ static int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf,
btrfs_csum_final(crc, result);
if (verify) {
- int from_this_trans = 0;
-
- if (root->fs_info->running_transaction &&
- btrfs_header_generation(buf) ==
- root->fs_info->running_transaction->transid)
- from_this_trans = 1;
-
/* FIXME, this is not good */
if (memcmp_extent_buffer(buf, result, 0, BTRFS_CRC32_SIZE)) {
u32 val;
@@ -203,11 +196,9 @@ static int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf,
read_extent_buffer(buf, &val, 0, BTRFS_CRC32_SIZE);
printk("btrfs: %s checksum verify failed on %llu "
- "wanted %X found %X from_this_trans %d "
- "level %d\n",
+ "wanted %X found %X level %d\n",
root->fs_info->sb->s_id,
- buf->start, val, found, from_this_trans,
- btrfs_header_level(buf));
+ buf->start, val, found, btrfs_header_level(buf));
return 1;
}
} else {