Commit Graph

8 Commits

Author SHA1 Message Date
David Sterba a4122790ac btrfs-progs: move extent-cache.c to common/
Signed-off-by: David Sterba <dsterba@suse.com>
2020-08-31 17:01:04 +02:00
Qu Wenruo d353a5b3c2 btrfs-progs: convert: report available space before conversion happens
Now if an ENOSPC error happened, the free space report would help user
to determine if it's a real ENOSPC or a bug in convert.

The reported free space is the calculated free space, which doesn't
include super block space, nor merged data chunks.

The free space is always smaller than the reported available space of
the original fs, as we need extra padding space for used space to avoid
too fragmented data chunks.

The output would be:

$ ./btrfs-convert /dev/sda
create btrfs filesystem:
        blocksize: 4096
        nodesize:  16384
        features:  extref, skinny-metadata (default)
        checksum:  crc32c
free space report:
        total:     10737418240
        free:      0 (0.00%)
ERROR: unable to create initial ctree: No space left on device
WARNING: an error occurred during conversion, the original filesystem is not modified

Signed-off-by: Qu Wenruo <wqu@suse.com>
[ put total, free to separate lines ]
Signed-off-by: David Sterba <dsterba@suse.com>
2020-08-31 17:01:03 +02:00
Adam Borowski 3d379b1341 btrfs-progs: lots of typo fixes (codespell)
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-31 18:37:38 +02:00
David Sterba 35ba1f5fb6 btrfs-progs: move common-defs to common/
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-31 18:37:35 +02:00
Lakshmipathi.G 8636132c6d btrfs-progs: convert: widen int types in convert context
The u32 types in the convert context might not be enough for some very
large filesytems (20TB). Use 64bit types to be safe.

Signed-off-by: Lakshmipathi.G <lakshmipathi.g@giis.co.in>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-06-26 17:09:53 +02:00
David Sterba 52319450e7 btrfs-progs: convert: rename members that clash with other functions
Rename 'free' and also 'used' for consistency.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:46 +01:00
David Sterba 203c52a850 btrfs-progs: convert: move common api implementation to own file
Lots of moved code but no actual changes.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:45 +01:00
David Sterba 5f276edfda btrfs-progs: move convert definitions to own header
Create a header for filesystem conversion API, the config and the main
entry function.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:45 +01:00