• Qu Wenruo's avatar
    btrfs: Add chunk allocation ENOSPC debug message for enospc_debug mount option · 4117f207
    Qu Wenruo authored
    Enospc_debug makes extent allocator print more debug messages,
    however for chunk allocation, there is no debug message for enospc_debug
    at all.
    
    This patch will add message for the following parts of chunk allocator:
    
    1) No rw device at all
       Quite rare, but at least output one message for this case.
    
    2) Not enough space for some device
       This debug message is quite handy for unbalanced disks with stripe
       based profiles (RAID0/10/5/6).
    
    3) Not enough free devices
       This debug message should tell us if current chunk allocator is
       working correctly under minimal device requirements.
    
    Although in most cases, we will hit other ENOSPC before we even hit a
    chunk allocator ENOSPC, but such debug info won't help.
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    4117f207
volumes.c 194 KB