[libvirt] [PATCH 0/4] qemu: fix restore domain with bypass cache flag

Nikolay Shirokovskiy posted 4 patches 6 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1504770256-674340-1-git-send-email-nshirokovskiy@virtuozzo.com
src/util/iohelper.c | 98 +++++++++++++++++++++++++++++++----------------------
src/util/virfile.c  |  2 +-
2 files changed, 59 insertions(+), 41 deletions(-)
[libvirt] [PATCH 0/4] qemu: fix restore domain with bypass cache flag
Posted by Nikolay Shirokovskiy 6 years, 7 months ago
It is not working currently. Error message is (with convinient wraps):

error: Failed to restore domain from tst6.sav
error: internal error: Child process (LIBVIRT_LOG_OUTPUTS=1:stderr \ 
    /usr/libexec/libvirt_iohelper /vz/dev/libvirt/tst6.sav 0 0) unexpected exit status 1: \
    /usr/libexec/libvirt_iohelper: failure with /vz/dev/libvirt/tst6.sav : \
    Unable to read /vz/dev/libvirt/tst6.sav: Invalid argument

The problem is that saferead function being used by iohelper is not quite suitable
for direct reads. It's last read that is supposed to read EOF is not properly
aligned thus EINVAL is returned.

Nikolay Shirokovskiy (4):
  iohelper: drop unused operation length limit
  iohelper: simplify last direct write alignment
  iohelper: reduce zero-out in align case
  iohelper: fix reading with O_DIRECT

 src/util/iohelper.c | 98 +++++++++++++++++++++++++++++++----------------------
 src/util/virfile.c  |  2 +-
 2 files changed, 59 insertions(+), 41 deletions(-)

-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list