Re: [libvirt] [PATCH] iohelper: use saferead if later write with O_DIRECT

2017-10-24 Thread Jiri Denemark
On Thu, Sep 28, 2017 at 10:06:47 +0300, Nikolay Shirokovskiy wrote: > 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 si

Re: [libvirt] [PATCH] iohelper: use saferead if later write with O_DIRECT

2017-10-23 Thread Nikolay Shirokovskiy
ping On 28.09.2017 10:06, Nikolay Shirokovskiy wrote: > 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 ali

[libvirt] [PATCH] iohelper: use saferead if later write with O_DIRECT

2017-09-28 Thread Nikolay Shirokovskiy
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. --- src/util/iohelper.c | 16 ++-- 1 file ch