linux/fs/btrfs
Josef Bacik 0a24325e6d Btrfs: don't keep retrying a block group if we fail to allocate a cluster
The box can get locked up in the allocator if we happen upon a block group
under these conditions:

1) During a commit, so caching threads cannot make progress
2) Our block group currently is in the middle of being cached
3) Our block group currently has plenty of free space in it
4) Our block group is so fragmented that it ends up having no free space chunks
larger than min_bytes calculated by btrfs_find_space_cluster.

What happens is we try and do btrfs_find_space_cluster, which fails because it
is unable to find enough free space chunks that are large than min_bytes and
are close enough together.  Since the block group is not cached we do a
wait_block_group_cache_progress, which waits for the number of bytes we need,
except the block group already has _plenty_ of free space, its just severely
fragmented, so we loop and try again, ad infinitum.  This patch keeps us from
waiting on the block group to finish caching if we failed to find a free space
cluster before.  It also makes sure that we don't even try to find a free space
cluster if we are on our last loop in the allocator, since we will have tried
everything at this point at it is futile.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2009-09-21 19:23:49 -04:00
..
acl.c
async-thread.c Btrfs: Fix async thread shutdown race 2009-09-15 20:20:17 -04:00
async-thread.h Btrfs: keep irqs on more often in the worker threads 2009-09-11 13:31:04 -04:00
btrfs_inode.h Btrfs: change how subvolumes are organized 2009-09-21 15:56:00 -04:00
compat.h
compression.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable 2009-09-11 19:07:25 -04:00
compression.h
ctree.c
ctree.h Btrfs: make balance code choose more wisely when relocating 2009-09-21 19:23:48 -04:00
delayed-ref.c
delayed-ref.h
dir-item.c Btrfs: change how subvolumes are organized 2009-09-21 15:56:00 -04:00
disk-io.c Btrfs: add snapshot/subvolume destroy ioctl 2009-09-21 16:00:26 -04:00
disk-io.h
export.c Btrfs: add snapshot/subvolume destroy ioctl 2009-09-21 16:00:26 -04:00
export.h
extent_io.c Btrfs: properly honor wbc->nr_to_write changes 2009-09-18 16:08:46 -04:00
extent_io.h Btrfs: Use PagePrivate2 to track pages in the data=ordered code. 2009-09-11 13:31:07 -04:00
extent_map.c Btrfs: search for an allocation hint while filling file COW 2009-09-18 16:08:52 -04:00
extent_map.h Btrfs: search for an allocation hint while filling file COW 2009-09-18 16:08:52 -04:00
extent-tree.c Btrfs: don't keep retrying a block group if we fail to allocate a cluster 2009-09-21 19:23:49 -04:00
file-item.c
file.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable 2009-09-11 19:07:25 -04:00
free-space-cache.c Btrfs: fix btrfs_remove_from_free_space corner case 2009-07-31 11:03:58 -04:00
free-space-cache.h
hash.h
inode-item.c Btrfs: do not reuse objectid of deleted snapshot/subvol 2009-09-21 15:56:00 -04:00
inode-map.c Btrfs: do not reuse objectid of deleted snapshot/subvol 2009-09-21 15:56:00 -04:00
inode.c Btrfs: add snapshot/subvolume destroy ioctl 2009-09-21 16:00:26 -04:00
ioctl.c Btrfs: fix arithmetic error in clone ioctl 2009-09-21 16:00:27 -04:00
ioctl.h Btrfs: add snapshot/subvolume destroy ioctl 2009-09-21 16:00:26 -04:00
Kconfig
locking.c
locking.h
Makefile
ordered-data.c Btrfs: Use PagePrivate2 to track pages in the data=ordered code. 2009-09-11 13:31:07 -04:00
ordered-data.h Btrfs: Use PagePrivate2 to track pages in the data=ordered code. 2009-09-11 13:31:07 -04:00
orphan.c Btrfs: change how subvolumes are organized 2009-09-21 15:56:00 -04:00
print-tree.c
print-tree.h
ref-cache.c
ref-cache.h
relocation.c Btrfs: add snapshot/subvolume destroy ioctl 2009-09-21 16:00:26 -04:00
root-tree.c Btrfs: add snapshot/subvolume destroy ioctl 2009-09-21 16:00:26 -04:00
struct-funcs.c
super.c Btrfs: add snapshot/subvolume destroy ioctl 2009-09-21 16:00:26 -04:00
sysfs.c
transaction.c Btrfs: add snapshot/subvolume destroy ioctl 2009-09-21 16:00:26 -04:00
transaction.h Btrfs: be more polite in the async caching threads 2009-07-30 10:14:46 -04:00
tree-defrag.c
tree-log.c Btrfs: add snapshot/subvolume destroy ioctl 2009-09-21 16:00:26 -04:00
tree-log.h
version.h
version.sh
volumes.c Btrfs: make balance code choose more wisely when relocating 2009-09-21 19:23:48 -04:00
volumes.h Btrfs: make balance code choose more wisely when relocating 2009-09-21 19:23:48 -04:00
xattr.c
xattr.h
zlib.c Btrfs: correct error-handling zlib error handling 2009-08-07 13:51:33 -04:00