Remove fsync(2) call after every write to a receiving --file. (#1176)

This removes a performance pessimization that wasn't really
needed in the first place.

Fixes #1159.
This commit is contained in:
Bruce A. Mah 2021-06-29 17:27:05 -07:00 committed by GitHub
parent 3b31c4b6ac
commit 36a094d403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4277,7 +4277,6 @@ diskfile_recv(struct iperf_stream *sp)
r = sp->rcv2(sp);
if (r > 0) {
(void) write(sp->diskfile_fd, sp->buffer, r);
(void) fsync(sp->diskfile_fd);
}
return r;
}