Maybe its worth it to take a step back and not reinvent the wheel here as this is a fairly typical monkey testing approach.
Most filesystems have test suites, so there's tests for this out there already.
for example:
https://git.kernel.org/pub/scm/fs/xf...e/src/fstest.c
and the classical FSX:
http://codemonkey.org.uk/projects/fsx/
https://github.com/linux-test-projec...ux/fsx-linux.c