Re: [PATCH] Btrfs: return ENOSPC when target space is full

2014-01-19 Thread Alex Lyakas
Hi Filipe, I think in the context of do_chunk_alloc(), 0 doesn't mean success. 0 means allocation was not attempted. While 1 means allocation was attempted and succeeded. -ENOSPC means allocation was attempted but failed. Any other errno deserves transaction abort. Anyways, the callers are ok with

[PATCH] Btrfs: return ENOSPC when target space is full

2013-08-05 Thread Filipe David Borba Manana
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