aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index efce9a2fa9be..10a2a579cc7f 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -610,7 +610,7 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
610 * that we don't try and read the other copies of this block, just 610 * that we don't try and read the other copies of this block, just
611 * return -EIO. 611 * return -EIO.
612 */ 612 */
613 if (found_level == 0 && btrfs_check_leaf(root, eb)) { 613 if (found_level == 0 && btrfs_check_leaf_full(root, eb)) {
614 set_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags); 614 set_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags);
615 ret = -EIO; 615 ret = -EIO;
616 } 616 }
@@ -3848,7 +3848,13 @@ void btrfs_mark_buffer_dirty(struct extent_buffer *buf)
3848 buf->len, 3848 buf->len,
3849 fs_info->dirty_metadata_batch); 3849 fs_info->dirty_metadata_batch);
3850#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY 3850#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
3851 if (btrfs_header_level(buf) == 0 && btrfs_check_leaf(root, buf)) { 3851 /*
3852 * Since btrfs_mark_buffer_dirty() can be called with item pointer set
3853 * but item data not updated.
3854 * So here we should only check item pointers, not item data.
3855 */
3856 if (btrfs_header_level(buf) == 0 &&
3857 btrfs_check_leaf_relaxed(root, buf)) {
3852 btrfs_print_leaf(buf); 3858 btrfs_print_leaf(buf);
3853 ASSERT(0); 3859 ASSERT(0);
3854 } 3860 }