In discard mode, if splice() is available, open a file descriptor to /dev/null and splice the input to that, to improve performance (#191).

This commit is contained in:
Andrew Wood
2026-05-03 14:53:45 +01:00
parent b75ecd79d5
commit 11d727a88d
7 changed files with 37 additions and 13 deletions
+2
View File
@@ -467,6 +467,8 @@ struct pvstate_s {
int intermediate_pipe[2];
int intermediate_pipe_buffer_size;
int intermediate_pipe_buffer_used;
/* File descriptor to /dev/null for splicing with -X. */
int discard_fd;
/*
* These variables are used to keep track of whether
* splice() was used; splice_failed_fd is the file