]> rtime.felk.cvut.cz Git - linux-imx.git/commit
Btrfs: fix chunk allocation error handling
authorJosef Bacik <jbacik@fusionio.com>
Tue, 29 Jan 2013 20:03:37 +0000 (15:03 -0500)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 17:59:10 +0000 (12:59 -0500)
commit0448748849ef7c593be40e2c1404f7974bd3aac6
treee964e58dc077f4f5576213e3210b8792d9794745
parent87533c475187c1420794a2e164bc67a7974f1327
Btrfs: fix chunk allocation error handling

If we error out allocating a dev extent we will have already created the
block group and such which will cause problems since the allocator may have
tried to allocate out of the block group that no longer exists.  This will
cause BUG_ON()'s in the bio submission path.  This also makes a failure to
allocate a dev extent a non-abort error, we will just clean up the dev
extents we did allocate and exit.  Now if we fail to delete the dev extents
we will abort since we can't have half of the dev extents hanging around,
but this will make us much less likely to abort.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/volumes.c