1
0
Fork 0
alistair23-linux/fs/btrfs
Josef Bacik 7b398f8e58 Btrfs: fill the global reserve when unpinning space
Dave gave me an image of a very full file system that would abort the
transaction because it ran out of space while committing the transaction.
This is because we would think there was plenty of room to create a snapshot
even though the global reserve was not full.  This happens because we
calculate the global reserve size before we unpin any space, so after we
unpin the space we allow reservations to occur even though we haven't
reserved all of the space for our global reserve.  Fix this by adding to the
global reserve while unpinning in order to make sure we always have enough
space to do our work.  With this patch we no longer end up with an aborted
transaction, we return ENOSPC properly to the person trying to create the
snapshot.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2012-12-11 13:31:36 -05:00
..
Kconfig Btrfs: add config option to enable btrfs integrity check 2011-12-21 19:14:16 +01:00
Makefile Merge branch 'send-v2' of git://github.com/ablock84/linux-btrfs into for-linus 2012-07-25 19:19:10 -04:00
acl.c userns: Pass a userns parameter into posix_acl_to_xattr and posix_acl_from_xattr 2012-09-18 01:01:35 -07:00
async-thread.c Btrfs: call the ordered free operation without any locks held 2012-07-25 16:15:07 -04:00
async-thread.h btrfs: return void in functions without error conditions 2012-03-22 01:45:34 +01:00
backref.c Merge branch 'for-chris-fixed' of git://git.jan-o-sch.net/btrfs-unstable 2012-10-25 15:53:10 -04:00
backref.h Btrfs: extended inode refs support for send mechanism 2012-10-25 15:45:16 -04:00
btrfs_inode.h Btrfs: fix a bug in checking whether a inode is already in log 2012-10-01 15:19:06 -04:00
check-integrity.c Btrfs: detect corrupted filesystem after write I/O errors 2012-10-09 09:20:10 -04:00
check-integrity.h Btrfs: add optional integrity check code 2011-12-21 19:14:09 +01:00
compat.h Btrfs: drop remaining LINUX_KERNEL_VERSION checks and compat code 2009-01-06 09:38:55 -05:00
compression.c Btrfs: cleanup pages properly when ENOMEM in compression 2012-10-09 09:20:25 -04:00
compression.h btrfs: return void in functions without error conditions 2012-03-22 01:45:34 +01:00
ctree.c Btrfs: cleanup unused arguments 2012-12-11 13:31:35 -05:00
ctree.h Btrfs: improve the noflush reservation 2012-12-11 13:31:31 -05:00
delayed-inode.c Btrfs: improve the noflush reservation 2012-12-11 13:31:31 -05:00
delayed-inode.h Btrfs: flush delayed inodes if we're short on space 2012-07-23 15:41:40 -04:00
delayed-ref.c Btrfs: allow delayed refs to be merged 2012-08-28 16:53:38 -04:00
delayed-ref.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-10-01 09:06:36 -07:00
dir-item.c btrfs: replace many BUG_ONs with proper error handling 2012-03-22 11:52:54 +01:00
disk-io.c Btrfs: remove repeated eb->pages check in, disk-io.c/csum_dirty_buffer 2012-10-09 09:37:30 -04:00
disk-io.h Btrfs: make filesystem read-only when submitting barrier fails 2012-10-09 09:20:19 -04:00
export.c ->encode_fh() API change 2012-05-29 23:28:33 -04:00
export.h NFS support for btrfs - v3 2008-09-25 11:04:06 -04:00
extent-tree.c Btrfs: fill the global reserve when unpinning space 2012-12-11 13:31:36 -05:00
extent_io.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2012-10-26 09:34:04 -07:00
extent_io.h btrfs: move inline function code to header file 2012-10-09 09:15:43 -04:00
extent_map.c Btrfs: do not hold the write_lock on the extent tree while logging 2012-10-04 09:39:58 -04:00
extent_map.h Btrfs: do not hold the write_lock on the extent tree while logging 2012-10-04 09:39:58 -04:00
file-item.c btrfs: fix min csum item size warnings in 32bit 2012-10-09 09:15:39 -04:00
file.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2012-10-10 10:49:20 +09:00
free-space-cache.c Btrfs: fix unnecessary while loop when search the free space, cache 2012-12-11 13:31:33 -05:00
free-space-cache.h btrfs: remove all unused functions 2011-05-06 12:34:03 +02:00
hash.h btrfs: extended inode refs 2012-10-09 09:14:45 -04:00
inode-item.c btrfs: extended inode refs 2012-10-09 09:14:45 -04:00
inode-map.c Btrfs: improve the noflush reservation 2012-12-11 13:31:31 -05:00
inode-map.h Btrfs: Support reading/writing on disk free ino cache 2011-04-25 16:46:11 +08:00
inode.c Btrfs: improve the noflush reservation 2012-12-11 13:31:31 -05:00
ioctl.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2012-10-26 09:34:04 -07:00
ioctl.h Merge branch 'send-v2' of git://github.com/ablock84/linux-btrfs into for-linus 2012-07-25 19:19:10 -04:00
locking.c Btrfs: fix a misplaced address operator in a condition 2012-08-28 16:53:23 -04:00
locking.h btrfs: return void in functions without error conditions 2012-03-22 01:45:34 +01:00
lzo.c btrfs: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:21 +08:00
math.h Btrfs: cleanup duplicated division functions 2012-12-11 13:31:30 -05:00
ordered-data.c Btrfs: kill obsolete arguments in btrfs_wait_ordered_extents 2012-10-04 09:39:57 -04:00
ordered-data.h Btrfs: kill obsolete arguments in btrfs_wait_ordered_extents 2012-10-04 09:39:57 -04:00
orphan.c btrfs: replace many BUG_ONs with proper error handling 2012-03-22 11:52:54 +01:00
print-tree.c Btrfs: read device stats on mount, write modified ones during commit 2012-05-30 10:23:41 -04:00
print-tree.h Btrfs: Create extent_buffer interface for large blocksizes 2008-09-25 11:03:56 -04:00
qgroup.c Btrfs: fix memory leak in btrfs_quota_enable() 2012-10-25 15:45:43 -04:00
rcu-string.h Btrfs: use rcu to protect device->name 2012-06-14 21:29:16 -04:00
reada.c btrfs: reada_extent doesn't need kref for refcount 2012-10-02 21:35:55 -04:00
relocation.c Btrfs: improve the noflush reservation 2012-12-11 13:31:31 -05:00
root-tree.c btrfs: move transaction aborts to the point of failure 2012-10-08 20:09:02 -04:00
scrub.c btrfs: Kill some bi_idx references 2012-10-01 15:19:21 -04:00
send.c Btrfs: Send: preserve ownership (uid and gid) also for symlinks. 2012-10-25 15:47:31 -04:00
send.h Btrfs: write_buf is now callable outside send.c 2012-10-04 09:39:55 -04:00
struct-funcs.c Btrfs: rewrite BTRFS_SETGET_FUNCS 2012-07-23 16:28:06 -04:00
super.c Btrfs: make compress and nodatacow mount options mutually exclusive 2012-10-09 09:20:03 -04:00
sysfs.c btrfs: Remove unused sysfs code 2011-06-17 14:54:18 -04:00
transaction.c Btrfs: improve the noflush reservation 2012-12-11 13:31:31 -05:00
transaction.h Btrfs: improve the noflush reservation 2012-12-11 13:31:31 -05:00
tree-defrag.c btrfs: drop unused parameter from btrfs_release_path 2011-05-02 13:57:22 +02:00
tree-log.c btrfs: Fix compilation with user namespace support enabled 2012-10-12 15:01:42 -07:00
tree-log.h btrfs: return void in functions without error conditions 2012-03-22 01:45:34 +01:00
ulist.c Btrfs: make aux field of ulist 64 bit 2012-10-01 15:18:53 -04:00
ulist.h Btrfs: make aux field of ulist 64 bit 2012-10-01 15:18:53 -04:00
version.h Update Btrfs files for in-kernel usage 2008-09-25 15:41:59 -04:00
volumes.c Btrfs: recheck bio against block device when we map the bio 2012-12-11 13:31:32 -05:00
volumes.h Btrfs: revert checksum error statistic which can cause a BUG() 2012-08-28 16:53:39 -04:00
xattr.c Btrfs: use i_version instead of our own sequence 2012-05-30 10:23:27 -04:00
xattr.h fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00
zlib.c btrfs: fix message printing 2012-10-09 09:19:57 -04:00