linux-stable-rt/fs/btrfs
Josef Bacik 07103a3cdb Btrfs: fix free space accounting when unpinning extents
This patch fixes what I hope is the last early ENOSPC bug left.  I did not know
that pinned extents would merge into one big extent when inserted on to the
pinned extent tree, so I was adding free space to a block group that could
possibly span multiple block groups.

This is a big issue because first that space doesn't exist in that block group,
and second we won't actually use that space because there are a bunch of other
checks to make sure we're allocating within the constraints of the block group.

This patch fixes the problem by adding the btrfs_add_free_space to
btrfs_update_pinned_extents which makes sure we are adding the appropriate
amount of free space to the appropriate block group.  Thanks much to Lee Trager
for running my myriad of debug patches to help me track this problem down.
Thank you,

Signed-off-by: Josef Bacik <jbacik@redhat.com>
2008-11-19 15:17:55 -05:00
..
COPYING
INSTALL
Makefile
acl.c
async-thread.c Btrfs: Check kthread_should_stop() before schedule() in worker_loop 2008-11-12 14:36:58 -05:00
async-thread.h
btrfs_inode.h
compat.h
compression.c Btrfs: Fix compile warnings on 32 bit machines 2008-11-11 09:34:41 -05:00
compression.h
crc32c.h
ctree.c Btrfs: Some fixes for batching extent insert. 2008-11-18 11:30:10 -05:00
ctree.h Btrfs: Update the disk format for the seed device and new root code 2008-11-18 11:50:33 -05:00
dir-item.c
disk-io.c Btrfs: Do fsync log replay when mount -o ro, except when on readonly media 2008-11-19 15:13:35 -05:00
disk-io.h Btrfs: mount ro and remount support 2008-11-12 14:34:12 -05:00
export.c
export.h
extent-tree.c Btrfs: fix free space accounting when unpinning extents 2008-11-19 15:17:55 -05:00
extent_io.c Btrfs: Avoid writeback stalls 2008-11-19 12:44:22 -05:00
extent_io.h
extent_map.c
extent_map.h Btrfs: Fix csum error for compressed data 2008-11-10 07:34:43 -05:00
file-item.c Btrfs: Use invalidatepage when writepage finds a page outside of i_size 2008-11-10 11:50:50 -05:00
file.c Btrfs: Fix race in btrfs_mark_extent_written 2008-11-12 14:19:50 -05:00
free-space-cache.c
hash.h
inode-item.c
inode-map.c
inode.c Btrfs: Avoid writeback stalls 2008-11-19 12:44:22 -05:00
ioctl.c Btrfs: prevent loops in the directory tree when creating snapshots 2008-11-17 21:14:24 -05:00
ioctl.h Btrfs: Allow subvolumes and snapshots anywhere in the directory tree 2008-11-17 21:02:50 -05:00
locking.c
locking.h
ordered-data.c
ordered-data.h
orphan.c
print-tree.c
print-tree.h
ref-cache.c
ref-cache.h
root-tree.c Btrfs: prevent loops in the directory tree when creating snapshots 2008-11-17 21:14:24 -05:00
struct-funcs.c
super.c Btrfs: Allow subvolumes and snapshots anywhere in the directory tree 2008-11-17 21:02:50 -05:00
sysfs.c
transaction.c Btrfs: switch back to wait_on_page_writeback to wait on metadata writes 2008-11-18 12:13:12 -05:00
transaction.h Btrfs: Allow subvolumes and snapshots anywhere in the directory tree 2008-11-17 21:02:50 -05:00
tree-defrag.c
tree-log.c
tree-log.h
version.h
version.sh
volumes.c Btrfs: Add a missing return pointer check 2008-11-12 14:38:54 -05:00
volumes.h Btrfs: Seed device support 2008-11-17 21:11:30 -05:00
xattr.c
xattr.h
zlib.c Btrfs: Fix compile warnings on 32 bit machines 2008-11-11 09:34:41 -05:00