]> git.ipfire.org Git - thirdparty/libvirt.git/commit
iohelper: use saferead if later write with O_DIRECT
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Thu, 28 Sep 2017 07:06:47 +0000 (10:06 +0300)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 24 Oct 2017 08:53:18 +0000 (10:53 +0200)
commit05021e727d80527c4b53debed98b87b565780a16
treeca884efb3c37544efd2a546b7d5abac622c73514
parent55ac6a5d44a2fbd7e93d995930d6071030c907ba
iohelper: use saferead if later write with O_DIRECT

One of the usecases of iohelper is to read from pipe and write
to file with O_DIRECT. As we read from pipe we can have partial
read and then we fail to write this data because output file
is open with O_DIRECT and buffer size is not aligned.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/util/iohelper.c