allocate_balanced_strategy inode bmaps td owner repl index number bs pref:
Allocates blocks for the index range index to index+number-1.
The replication factor is repl. The blocks are allocated in the
passed blockmaps bmaps, and will be assigned to owner.
Tickets are generated for the transaction identified by td.
In bs the blocksize must be passed. The list pref can contain
the identities of preferred datanodes; if possible blocks are
allocated there.

This algorithm allocates blocks in ranges, and tries to get a
balanced allocation with respect to the datanodes.