Skip to content

file-posix: Fix zone update in I/O error path

Hanna Czenczek requested to merge hreitz/qemu-kvm-c-9-s:jira-rhel-7360 into c9s

Merge Request Required Information

Summary of Changes

Before this series, raw_co_prw()’s I/O error path calls update_zones_wp() regardless of whether zone information is present. update_zones_wp() however assumes it is, so if it isn’t (i.e. most of the time), qemu will crash because of a division by zero. Fix that by checking for zone information before calling that, and make the whole code a bit nicer (so we just have a single block of code handling zoning stuff at the end of raw_co_prw()).

I noticed there’s a typo in patch 2 which breaks the build. That code is removed in patch 4 again, which is probably why I missed it before, but I decided to fix it downstream regardless.

Approved Development Ticket

Jira: https://issues.redhat.com/browse/RHEL-7360

Merge request reports

Loading