Move the disk size computation to its own function