Add a TODO indicating the problems so far and what to try next (#45).

This commit is contained in:
Andrew Wood
2025-10-15 17:49:38 +01:00
parent c21ad6fdf1
commit 71f929e29c
+13
View File
@@ -710,6 +710,19 @@ static int pv__transfer_write(pvstate_t state, bool *eof_in, bool *eof_out, long
debug("%s: %s", "output lseek() failed", strerror(errno));
state->transfer.output_not_seekable = true;
} else if (0 != ftruncate(state->control.output_fd, output_offset)) {
/* TODO: don't ftruncate() immediately. */
/*
* On XFS filesystems it looks like
* this can actually make a sparse
* file take up more space than a
* regular file, though it's not
* obvious yet whether the
* ftruncate() is causing it or just
* the lseek().
*
* Maybe just ftruncate() at the end
* of the program.
*/
debug("%s: %s", "output ftruncate() failed", strerror(errno));
state->transfer.output_not_seekable = true;
} else {