]> git.baikalelectronics.ru Git - kernel.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)
commit254d78271d7806e49fce0c98fb8ae4030c4bd3eb
treee964e58dc077f4f5576213e3210b8792d9794745
parent70d3a322edec75eec73cdc8b953d2cb15c470506
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