mkfs: fix mkfs -r to properly allocate space
authorChris Mason <chris.mason@fusionio.com>
Wed, 16 Oct 2013 14:36:55 +0000 (10:36 -0400)
committerChris Mason <chris.mason@fusionio.com>
Wed, 16 Oct 2013 14:42:53 +0000 (10:42 -0400)
commitd1570a06184ed3748536a67693ef5cfd954d4032
tree3fe610614ddc64a510006820a518297d14a9dec1
parent005d7d2efb0aaaae056584f3cbd25d3bfce73ea3
mkfs: fix mkfs -r to properly allocate space

mkfs -r wasn't creating chunks properly, making it very difficult to
allocate space for anything except tiny filesystems.

This changes it around to use more of the generic infrastructure, and
to do actual logical->physical block number translation.

It also allocates space to the files in smaller extents (max 1MB), which
keeps the allocator from trying to allocate an extent bigger than a
single chunk.

It doesn't quite support multi-device mkfs -r yet, but is much closer.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
btrfs-convert.c
ctree.h
disk-io.c
disk-io.h
extent-tree.c
mkfs.c