diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-04-09 16:28:12 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:01 -0400 |
commit | 728131d8e40c2a47c59ca91a806299c4708029f9 (patch) | |
tree | 4b6023689d6f77fdf785d815a2ca986e73aeff1a /fs/btrfs/disk-io.c | |
parent | cea9e4452ebaf18dd0951e90dc84d82a5dee40b2 (diff) |
Btrfs: Add additional debugging for metadata checksum failures
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index bc5bd5abb28a..e444b99e02da 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -283,6 +283,7 @@ static int btree_releasepage(struct page *page, gfp_t gfp_flags) | |||
283 | map = &BTRFS_I(page->mapping->host)->extent_tree; | 283 | map = &BTRFS_I(page->mapping->host)->extent_tree; |
284 | ret = try_release_extent_mapping(map, tree, page, gfp_flags); | 284 | ret = try_release_extent_mapping(map, tree, page, gfp_flags); |
285 | if (ret == 1) { | 285 | if (ret == 1) { |
286 | invalidate_extent_lru(tree, page_offset(page), PAGE_CACHE_SIZE); | ||
286 | ClearPagePrivate(page); | 287 | ClearPagePrivate(page); |
287 | set_page_private(page, 0); | 288 | set_page_private(page, 0); |
288 | page_cache_release(page); | 289 | page_cache_release(page); |
@@ -376,7 +377,6 @@ int btrfs_verify_block_csum(struct btrfs_root *root, | |||
376 | buf->flags |= EXTENT_CSUM; | 377 | buf->flags |= EXTENT_CSUM; |
377 | return 0; | 378 | return 0; |
378 | } | 379 | } |
379 | |||
380 | lock_extent(io_tree, buf->start, end, GFP_NOFS); | 380 | lock_extent(io_tree, buf->start, end, GFP_NOFS); |
381 | 381 | ||
382 | if (test_range_bit(io_tree, buf->start, end, EXTENT_CSUM, 1)) { | 382 | if (test_range_bit(io_tree, buf->start, end, EXTENT_CSUM, 1)) { |
@@ -384,6 +384,7 @@ int btrfs_verify_block_csum(struct btrfs_root *root, | |||
384 | ret = 0; | 384 | ret = 0; |
385 | goto out_unlock; | 385 | goto out_unlock; |
386 | } | 386 | } |
387 | WARN_ON(buf->flags & EXTENT_CSUM); | ||
387 | 388 | ||
388 | ret = csum_tree_block(root, buf, 1); | 389 | ret = csum_tree_block(root, buf, 1); |
389 | set_extent_bits(io_tree, buf->start, end, EXTENT_CSUM, GFP_NOFS); | 390 | set_extent_bits(io_tree, buf->start, end, EXTENT_CSUM, GFP_NOFS); |