]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: Delete csum items when freeing extents
authorChris Mason <chris.mason@oracle.com>
Wed, 10 Dec 2008 14:10:46 +0000 (09:10 -0500)
committerChris Mason <chris.mason@oracle.com>
Wed, 10 Dec 2008 14:10:46 +0000 (09:10 -0500)
commitedca3b674f5857ff75da1a9894c8fdf4c36404a9
tree86088c14cff53f93281dc25022b61fb1d86c2458
parent3a51a1edc4858b5773fa384508d0876a6f2138ab
Btrfs: Delete csum items when freeing extents

This finishes off the new checksumming code by removing csum items
for extents that are no longer in use.

The trick is doing it without racing because a single csum item may
hold csums for more than one extent.  Extra checks are added to
btrfs_csum_file_blocks to make sure that we are using the correct
csum item after dropping locks.

A new btrfs_split_item is added to split a single csum item so it
can be split without dropping the leaf lock.  This is used to
remove csum bytes from the middle of an item.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/file-item.c