kernel_optimize_test/fs/btrfs
Josef Bacik 6a63209fc0 Btrfs: add better -ENOSPC handling
This is a step in the direction of better -ENOSPC handling.  Instead of
checking the global bytes counter we check the space_info bytes counters to
make sure we have enough space.

If we don't we go ahead and try to allocate a new chunk, and then if that fails
we return -ENOSPC.  This patch adds two counters to btrfs_space_info,
bytes_delalloc and bytes_may_use.

bytes_delalloc account for extents we've actually setup for delalloc and will
be allocated at some point down the line. 

bytes_may_use is to keep track of how many bytes we may use for delalloc at
some point.  When we actually set the extent_bit for the delalloc bytes we
subtract the reserved bytes from the bytes_may_use counter.  This keeps us from
not actually being able to allocate space for any delalloc bytes.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
2009-02-20 11:00:09 -05:00
..
acl.c
async-thread.c
async-thread.h
btrfs_inode.h
compat.h
compression.c
compression.h
crc32c.h
ctree.c
ctree.h
dir-item.c
disk-io.c
disk-io.h
export.c
export.h
extent_io.c
extent_io.h
extent_map.c
extent_map.h
extent-tree.c
file-item.c
file.c
free-space-cache.c
hash.h
inode-item.c
inode-map.c
inode.c
ioctl.c
ioctl.h
Kconfig
locking.c
locking.h
Makefile
ordered-data.c
ordered-data.h
orphan.c
print-tree.c
print-tree.h
ref-cache.c
ref-cache.h
root-tree.c
struct-funcs.c
super.c
sysfs.c
transaction.c
transaction.h
tree-defrag.c
tree-log.c
tree-log.h
version.h
version.sh
volumes.c
volumes.h
xattr.c
xattr.h
zlib.c