Btrfs: tree logging checksum fixes
authorYan Zheng <zheng.yan@oracle.com>
Tue, 6 Jan 2009 16:42:00 +0000 (11:42 -0500)
committerChris Mason <chris.mason@oracle.com>
Tue, 6 Jan 2009 16:42:00 +0000 (11:42 -0500)
commit07d400a6df4767a90d49a153fdb7f4cfa1e3f23e
tree8ca61bb87ffb72343b8d392a26fb7a6265f6fa3d
parent1ba12553f3600ffebad226c5204ab0e46df98161
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>
fs/btrfs/extent-tree.c
fs/btrfs/file-item.c
fs/btrfs/inode.c
fs/btrfs/tree-log.c