Use a much bigger block size when calling fwrite(). Each call to fwrite()
authorCarl Hetherington <cth@carlh.net>
Thu, 6 Aug 2020 22:11:38 +0000 (00:11 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 6 Aug 2020 22:17:04 +0000 (00:17 +0200)
commit6c685e0cd6143dd7a8b1a9b5631b1bc9c0c4d687
tree9dc4bdf16691d20ff659d7b58cccddab2bd8c0d1
parent334d3cb564c72bd430a17c6e6f01aeb488fb191c
Use a much bigger block size when calling fwrite().  Each call to fwrite()
writes a few (often around 4) blocks of (I think) directory data to the
drive, so if you only fwrite() one block it ends up writing 1 block of
"payload" and 4 blocks of "admin".  Using bigger blocks makes it faster;
an even bigger block than this makes it a little faster still, but not
significantly.

The extra block writing is seemingly triggered by fwrite() calling
ext4_block_cache_write_back(..., 0). A better fix is probably to call
this another way, at the end of the file copy.
src/tools/dcpomatic_disk_writer.cc