diff options
author | Yan Zheng <zheng.yan@oracle.com> | 2009-01-06 11:42:00 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-01-06 11:42:00 -0500 |
commit | 07d400a6df4767a90d49a153fdb7f4cfa1e3f23e (patch) | |
tree | 8ca61bb87ffb72343b8d392a26fb7a6265f6fa3d /fs/btrfs/extent-tree.c | |
parent | 1ba12553f3600ffebad226c5204ab0e46df98161 (diff) |
Btrfs: tree logging checksum fixes
This patch contains following things.
1) Limit the max size of btrfs_ordered_sum structure to PAGE_SIZE. This
struct is kmalloced so we want to keep it reasonable.
2) Replace copy_extent_csums by btrfs_lookup_csums_range. This was
duplicated code in tree-log.c
3) Remove replay_one_csum. csum items are replayed at the same time as
replaying file extents. This guarantees we only replay useful csums.
4) nbytes accounting fix.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 171ca30a3755..293da650873f 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -5579,7 +5579,7 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len) | |||
5579 | BUG_ON(ordered->file_offset != file_pos || ordered->len != len); | 5579 | BUG_ON(ordered->file_offset != file_pos || ordered->len != len); |
5580 | 5580 | ||
5581 | disk_bytenr = file_pos + BTRFS_I(inode)->index_cnt; | 5581 | disk_bytenr = file_pos + BTRFS_I(inode)->index_cnt; |
5582 | ret = btrfs_lookup_csums_range(root, disk_bytenr, | 5582 | ret = btrfs_lookup_csums_range(root->fs_info->csum_root, disk_bytenr, |
5583 | disk_bytenr + len - 1, &list); | 5583 | disk_bytenr + len - 1, &list); |
5584 | 5584 | ||
5585 | while (!list_empty(&list)) { | 5585 | while (!list_empty(&list)) { |