Btrfs: Fix hole insertion corner cases
authorChris Mason <chris.mason@oracle.com>
Tue, 22 Jan 2008 21:47:59 +0000 (16:47 -0500)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:03:59 +0000 (11:03 -0400)
commit5f56406aabdf5444d040c5955effc665b1d0dbaf
tree59c82cc7f5d5de3b65b6eba24b505684eb7941d6
parentc1e32da616a17813f11b701a7a87775d35c12e3a
Btrfs: Fix hole insertion corner cases

There were a few places that could cause duplicate extent insertion,
this adjusts the code that creates holes to avoid it.

lookup_extent_map is changed to correctly return all of the extents in a
range, even when there are none matching at the start of the range.

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