Introduce VIR_STREAM_RECV_STOP_AT_HOLE flag

Add a new flag to virStreamRecvFlags in order to handle being able to
stop reading from the stream so that the consumer can generate a "hole"
in stream target. Generation of a hole replaces the need to receive and
handle a sequence of zero bytes for sparse stream targets.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik
2016-05-20 15:12:59 +02:00
parent b6aedd2f05
commit 87e4a842b7
2 changed files with 37 additions and 1 deletions

View File

@@ -45,6 +45,10 @@ int virStreamRecv(virStreamPtr st,
char *data,
size_t nbytes);
typedef enum {
VIR_STREAM_RECV_STOP_AT_HOLE = (1 << 0),
} virStreamRecvFlagsValues;
int virStreamRecvFlags(virStreamPtr st,
char *data,
size_t nbytes,