Btrfs: Split the extent_map code into two parts
authorChris Mason <chris.mason@oracle.com>
Thu, 24 Jan 2008 21:13:08 +0000 (16:13 -0500)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:03:59 +0000 (11:03 -0400)
commitd1310b2e0cd98eb1348553e69b73827b436dca7b
treef55e9c380df0f3a7e9fb792b2308b52b632b90aa
parent5f56406aabdf5444d040c5955effc665b1d0dbaf
Btrfs: Split the extent_map code into two parts

There is now extent_map for mapping offsets in the file to disk and
extent_io for state tracking, IO submission and extent_bufers.

The new extent_map code shifts from [start,end] pairs to [start,len], and
pushes the locking out into the caller.  This allows a few performance
optimizations and is easier to use.

A number of extent_map usage bugs were fixed, mostly with failing
to remove extent_map entries when changing the file.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 files changed:
fs/btrfs/Makefile
fs/btrfs/btrfs_inode.h
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/extent_io.c [new file with mode: 0644]
fs/btrfs/extent_io.h [new file with mode: 0644]
fs/btrfs/extent_map.c
fs/btrfs/extent_map.h
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/super.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h