]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Add chunk allocation ENOSPC debug message for enospc_debug mount option
authorQu Wenruo <wqu@suse.com>
Mon, 22 Jan 2018 05:50:54 +0000 (13:50 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:35 +0000 (15:09 +0200)
commitb1d6d6b8ad231650ab4c5c0c5a320eae9d1846f3
tree30ece2213030cb2f2b6cc1a594e5e07c7711abb6
parent3a356b5dfd55977c92a9bd2670722d79ebfe0ffb
btrfs: Add chunk allocation ENOSPC debug message for enospc_debug mount option

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: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c