diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-08-04 08:20:15 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:06 -0400 |
commit | 2dd3e67b1eaec8504da7e12b8afee77323a49f38 (patch) | |
tree | 794035de0243b20cda0fdf571e2ed02f29aa962e /fs/btrfs/disk-io.c | |
parent | 65b51a009e29e64c0951f21ea17fdc66bbb0fbd7 (diff) |
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.c | 13 |
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, | |||
188 | btrfs_csum_final(crc, result); | 188 | btrfs_csum_final(crc, result); |
189 | 189 | ||
190 | if (verify) { | 190 | if (verify) { |
191 | int from_this_trans = 0; | ||
192 | |||
193 | if (root->fs_info->running_transaction && | ||
194 | btrfs_header_generation(buf) == | ||
195 | root->fs_info->running_transaction->transid) | ||
196 | from_this_trans = 1; | ||
197 | |||
198 | /* FIXME, this is not good */ | 191 | /* FIXME, this is not good */ |
199 | if (memcmp_extent_buffer(buf, result, 0, BTRFS_CRC32_SIZE)) { | 192 | if (memcmp_extent_buffer(buf, result, 0, BTRFS_CRC32_SIZE)) { |
200 | u32 val; | 193 | u32 val; |
@@ -203,11 +196,9 @@ static int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf, | |||
203 | 196 | ||
204 | read_extent_buffer(buf, &val, 0, BTRFS_CRC32_SIZE); | 197 | read_extent_buffer(buf, &val, 0, BTRFS_CRC32_SIZE); |
205 | printk("btrfs: %s checksum verify failed on %llu " | 198 | printk("btrfs: %s checksum verify failed on %llu " |
206 | "wanted %X found %X from_this_trans %d " | 199 | "wanted %X found %X level %d\n", |
207 | "level %d\n", | ||
208 | root->fs_info->sb->s_id, | 200 | root->fs_info->sb->s_id, |
209 | buf->start, val, found, from_this_trans, | 201 | buf->start, val, found, btrfs_header_level(buf)); |
210 | btrfs_header_level(buf)); | ||
211 | return 1; | 202 | return 1; |
212 | } | 203 | } |
213 | } else { | 204 | } else { |