diff options
author | Filipe David Borba Manana <fdmanana@gmail.com> | 2013-08-05 16:25:12 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 08:04:55 -0400 |
commit | 09fb99a696412ae0fceeafc06c987903416503b9 (patch) | |
tree | c541ed0dc8707e9b5a183b637e7eb58a1306095c /fs/btrfs/compression.c | |
parent | ada9af215cf7ce663ff3bf9d255923d75b57a4ce (diff) |
Btrfs: return ENOSPC when target space is full
In extent-tree.c:do_chunk_alloc(), early on we returned 0 (success)
when the target space was full and when chunk allocation is needed.
However, later on in that same function we return ENOSPC if
btrfs_alloc_chunk() fails (and chunk allocation was needed) and
set the space's full flag.
This was inconsistent, as -ENOSPC should be returned if the space
is full and a chunk allocation needs to performed. If the space is
full but no chunk allocation is needed, just return 0 (success).
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/compression.c')
0 files changed, 0 insertions, 0 deletions