When receiving a disk file with the -F flag, do an fsync() after each write().
This commit is contained in:
parent
7bcbb1f653
commit
979405373d
@ -2105,8 +2105,10 @@ diskfile_recv(struct iperf_stream *sp)
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
r = sp->rcv2(sp);
|
r = sp->rcv2(sp);
|
||||||
if (r > 0)
|
if (r > 0) {
|
||||||
(void) write(sp->diskfile_fd, sp->buffer, r);
|
(void) write(sp->diskfile_fd, sp->buffer, r);
|
||||||
|
(void) fsync(sp->diskfile_fd);
|
||||||
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user