https://github.com/torvalds/linux
Revision 5a24e84c55f57cc49bd1cab531b6ef28b6b7bdaa authored by Josef Bacik on 08 August 2012, 16:12:59 UTC, committed by Chris Mason on 28 August 2012, 20:53:37 UTC
Subvol delete is a special kind of awful where we use the global reserve to
cover the ENOSPC requirements.  The problem is once we're done removing
everything we do a btrfs_update_inode(), which by default will try to do the
delayed update stuff which will use it's own reserve.  There will be no
space in this reserve and we'll return ENOSPC.  So instead use
btrfs_update_inode_fallback() which will just fallback to updating the inode
item in the case of enospc.  This is fine because the global reserve covers
the space requirements for this.  With this patch I can now delete a subvol
on a problem image Dave Sterba sent me.  Thanks,

Reported-by: David Sterba <dave@jikos.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
1 parent c0f62de
History
Tip revision: 5a24e84c55f57cc49bd1cab531b6ef28b6b7bdaa authored by Josef Bacik on 08 August 2012, 16:12:59 UTC
Btrfs: fix enospc problems when deleting a subvol
Tip revision: 5a24e84
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1014 bytes
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.7 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 208.2 KB
Makefile -rw-r--r-- 46.0 KB
README -rw-r--r-- 17.3 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top