diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-07-22 11:18:09 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:05 -0400 |
commit | f421950f86bf96a11fef932e167ab2e70d4c43a0 (patch) | |
tree | a2b62b942b023e37b6aae39891c2b314d8d8a3fb /fs/btrfs/ctree.h | |
parent | a61e6f29dc7c9d56a776a518eed92bbc61848263 (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/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 96ab2797c09..f8fccdac305 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -1590,6 +1590,8 @@ int btrfs_csum_truncate(struct btrfs_trans_handle *trans, | |||
1590 | struct btrfs_root *root, struct btrfs_path *path, | 1590 | struct btrfs_root *root, struct btrfs_path *path, |
1591 | u64 isize); | 1591 | u64 isize); |
1592 | /* inode.c */ | 1592 | /* inode.c */ |
1593 | int btrfs_writepages(struct address_space *mapping, | ||
1594 | struct writeback_control *wbc); | ||
1593 | int btrfs_create_subvol_root(struct btrfs_root *new_root, | 1595 | int btrfs_create_subvol_root(struct btrfs_root *new_root, |
1594 | struct btrfs_trans_handle *trans, u64 new_dirid, | 1596 | struct btrfs_trans_handle *trans, u64 new_dirid, |
1595 | struct btrfs_block_group_cache *block_group); | 1597 | struct btrfs_block_group_cache *block_group); |