aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-07-22 11:18:09 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:05 -0400
commitf421950f86bf96a11fef932e167ab2e70d4c43a0 (patch)
treea2b62b942b023e37b6aae39891c2b314d8d8a3fb /fs/btrfs/transaction.c
parenta61e6f29dc7c9d56a776a518eed92bbc61848263 (diff)
Btrfs: Fix some data=ordered related data corruptions
Stress testing was showing data checksum errors, most of which were caused by a lookup bug in the extent_map tree. The tree was caching the last pointer returned, and searches would check the last pointer first. But, search callers also expect the search to return the very first matching extent in the range, which wasn't always true with the last pointer usage. For now, the code to cache the last return value is just removed. It is easy to fix, but I think lookups are rare enough that it isn't required anymore. This commit also replaces do_sync_mapping_range with a local copy of the related functions. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 05823904ecba..38c75a0256cb 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -649,7 +649,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
649 extent_io_tree_init(pinned_copy, 649 extent_io_tree_init(pinned_copy,
650 root->fs_info->btree_inode->i_mapping, GFP_NOFS); 650 root->fs_info->btree_inode->i_mapping, GFP_NOFS);
651 651
652printk("commit trans %Lu\n", trans->transid);
653 trans->transaction->in_commit = 1; 652 trans->transaction->in_commit = 1;
654 trans->transaction->blocked = 1; 653 trans->transaction->blocked = 1;
655 cur_trans = trans->transaction; 654 cur_trans = trans->transaction;
@@ -745,7 +744,6 @@ printk("commit trans %Lu\n", trans->transid);
745 list_splice_init(&dirty_fs_roots, &root->fs_info->dead_roots); 744 list_splice_init(&dirty_fs_roots, &root->fs_info->dead_roots);
746 745
747 mutex_unlock(&root->fs_info->trans_mutex); 746 mutex_unlock(&root->fs_info->trans_mutex);
748printk("done commit trans %Lu\n", trans->transid);
749 kmem_cache_free(btrfs_trans_handle_cachep, trans); 747 kmem_cache_free(btrfs_trans_handle_cachep, trans);
750 748
751 if (root->fs_info->closing) { 749 if (root->fs_info->closing) {