btrfs-progs/convert
Marcos Paulo de Souza 65ecbc7e0e btrfs-progs: convert: show more info when reserve_space fails
btrfs-convert currently can't handle more fragmented block groups when
converting ext4 because the minimum size of a data chunk is 32MiB.

When converting an ext4 fs with more fragmented block group with the disk
almost full, we can end up hitting a ENOSPC problem [1] since smaller
block groups (10MiB for example) end up being extended to 32MiB, leaving
the free space tree smaller when converting it to btrfs.

This patch adds error messages telling which needed bytes couldn't be
allocated from the free space tree and shows the largest portion available:

  create btrfs filesystem:
	  blocksize: 4096
	  nodesize:  16384
	  features:  extref, skinny-metadata (default)
	  checksum:  crc32c
  free space report:
	  total:     1073741824
	  free:      39124992 (3.64%)
  ERROR: failed to reserve 33554432 bytes for metadata chunk, largest available: 33488896 bytes
  ERROR: unable to create initial ctree: No space left on device

Issue: #251
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-09-29 22:46:12 +02:00
..
Makefile
common.c btrfs-progs: convert: show more info when reserve_space fails 2020-09-29 22:46:12 +02:00
common.h btrfs-progs: move extent-cache.c to common/ 2020-08-31 17:01:04 +02:00
main.c btrfs-progs: move volumes.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
source-ext2.c btrfs-progs: move transaction.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
source-ext2.h btrfs-progs: convert: fix support for e2fsprogs < 1.42 2018-06-07 16:37:35 +02:00
source-fs.c btrfs-progs: move volumes.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
source-fs.h btrfs-progs: fix typos in comments 2018-11-26 18:24:48 +01:00
source-reiserfs.c btrfs-progs: move transaction.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
source-reiserfs.h btrfs-progs: convert: move reiserfs struct definitions to header 2017-09-08 16:15:05 +02:00