btrfs: fall back to global reservation when removing subvolumes
authorJeff Mahoney <jeffm@suse.com>
Tue, 9 Jul 2013 20:37:21 +0000 (16:37 -0400)
committerChris Mason <chris.mason@fusionio.com>
Sun, 1 Sep 2013 11:57:23 +0000 (07:57 -0400)
commitee3441b49092000402748f5345ee0a3d4c8ac04e
tree34ee8c6a2e89451eb8936f5d91d650c3bd475847
parent74be9510876a66ad9826613ac8a526d26f9e7f01
btrfs: fall back to global reservation when removing subvolumes

I recently did some ENOSPC testing that involved filling the disk
while create and removing snapshots in a loop. During the test cycle,
I ran into an ENOSPC when trying to remove a snapshot, leaving the fs
stuck in ENOSPC even after a umount/mount cycle.

This patch allow subvolume removal to fall back onto the global
block reservation in order to succeed when it would have failed
otherwise.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/ioctl.c