]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/btrfs/volumes.c
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)
commit4117f207d4b0d85ab78fec9cb138ed9c2a4b9f20
tree30ece2213030cb2f2b6cc1a594e5e07c7711abb6
parent566b1760b42be7c99c02e894b1ec9a707c2e83d1
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