//Useful constants
final int SEGSIZE = Configs.getFSConfig().getSegSize();
//Index by container id
ContainerIndex cntIdx = indexByContainer(blocks);
//For each container
for (int cntId : cntIdx.keySet())
{
//The blocks of this container
Container cnt = this.getContainer(cntId);
Block[] cntBlocks = cntIdx.get(cntId).toArray(new Block[cntIdx.get(cntId).size()]);
int numOfBlocksLeft = -1;
if (only)