summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-09 16:28:12 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:01 -0400
commitce9adaa5a792c2099a83246265eb4055bc38b6b8 (patch)
tree3ac03bb73cd3aad0c0b194d387cbb5b136c92fa7 /fs/btrfs/extent-tree.c
parent728131d8e40c2a47c59ca91a806299c4708029f9 (diff)
downloadkernel-crypto-ce9adaa5a792c2099a83246265eb4055bc38b6b8.tar.gz
kernel-crypto-ce9adaa5a792c2099a83246265eb4055bc38b6b8.tar.xz
kernel-crypto-ce9adaa5a792c2099a83246265eb4055bc38b6b8.zip
Btrfs: Do metadata checksums for reads via a workqueue
Before, metadata checksumming was done by the callers of read_tree_block, which would set EXTENT_CSUM bits in the extent tree to show that a given range of pages was already checksummed and didn't need to be verified again. But, those bits could go away via try_to_releasepage, and the end result was bogus checksum failures on pages that never left the cache. The new code validates checksums when the page is read. It is a little tricky because metadata blocks can span pages and a single read may end up going via multiple bios. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 0cb742884cd..283b08a32a4 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1898,10 +1898,6 @@ struct extent_buffer *__btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
set_extent_dirty(&trans->transaction->dirty_pages, buf->start,
buf->start + buf->len - 1, GFP_NOFS);
- set_extent_bits(&BTRFS_I(root->fs_info->btree_inode)->io_tree,
- buf->start, buf->start + buf->len - 1,
- EXTENT_CSUM, GFP_NOFS);
- buf->flags |= EXTENT_CSUM;
if (!btrfs_test_opt(root, SSD))
btrfs_set_buffer_defrag(buf);
trans->blocks_used++;