@julliard Thanks for taking the time to review.
About the file size increase, it sounds like a direct consequence of what this function is supposed to do, since it shall allocate some space for a file. Can you detail your thoughts about it?
About the tests, I guess you mean unit tests, right? Or did you mean tests on the parameters (say check that size is aligned with cluster size, or > to current size)? In the first case, I'm gonna try to add something, as digging a bit more the code showed that there is a basis.