On Mon, Oct 07, 2019 at 06:03:29PM -0700, Darrick J. Wong wrote: > To fix this, we need to force the filesystem to allocate all blocks > before freeing any blocks. Split the creation of swiss-cheese files > into two parts: (a) writing data to the file to force allocation, and > (b) punching the holes to fragment free space. It's a little hokey for > helpers to be modifying variables in the caller's scope, but there's not > really a better way to do that in bash. Why can't we just split the operations into creating a large contigous file and then fragment them? create_large_file foo create_large_file bar create_large_file baz fragment_large_file foo fragment_large_file bar fragment_large_file baz