Bug 1177219
Summary: | [Storage] vol-download / upload works well with an offset which was "too large" | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Pei Zhang <pzhang> |
Component: | libvirt | Assignee: | Erik Skultety <eskultet> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, jferlan, lhuang, mzhan, pkrempa, rbalakri, xuzhang, yanyang, yisun |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.14-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 06:05:48 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Pei Zhang
2014-12-25 08:05:52 UTC
Fixed upstream: commit 3fde7986d6694f122ae919d68ec64eee79bd51db Author: Erik Skultety <eskultet> Date: Tue Mar 3 16:57:38 2015 +0100 storage: tweak condition to properly test lseek According to the POSIX standard, off_t (returned by lseek) is defined as signed integral type no shorter than int. Because our offset variable is defined as unsigned long long, the original check was passed successfully if UINT64_MAX had been used as offset value, due to implicit conversion. v1.2.13-56-g3fde798 Verified On Versions: libvirt-1.2.15-2.el7.x86_64 verify steps: # cat qcow2.vol <volume> <name>qcow2-vol</name> <source> </source> <capacity unit='bytes'>1024000000</capacity> <allocation unit='bytes'>204000</allocation> <target> <format type='qcow2'/> <features> <lazy_refcounts/> </features> </target> </volume> # virsh vol-create default qcow2.vol Vol qcow2-vol created from qcow2.vol # cat raw.vol <volume> <name>raw-vol</name> <source> </source> <capacity unit='bytes'>589934592</capacity> <allocation unit='bytes'>56063232</allocation> <target> <format type='raw'/> </target> </volume> # virsh vol-create default raw.vol Vol raw-vol created from raw.vol use 2^64-1 (18446744073709551615) as boundary, all produce error messages as expected. # virsh vol-download --pool default qcow2-vol /var/lib/libvirt/images/raw-vol --offset 18446744073709551613 --length 18 error: cannot download from volume qcow2-vol error: Unable to seek /var/lib/libvirt/images/qcow2-vol to 18446744073709551613: Invalid argument # virsh vol-download --pool default qcow2-vol /var/lib/libvirt/images/raw-vol --offset 18446744073709551614 --length 18 error: cannot download from volume qcow2-vol error: Unable to seek /var/lib/libvirt/images/qcow2-vol to 18446744073709551614: Invalid argument # virsh vol-download --pool default qcow2-vol /var/lib/libvirt/images/raw-vol --offset 18446744073709551615 --length 18 error: cannot download from volume qcow2-vol error: Unable to seek /var/lib/libvirt/images/qcow2-vol to 18446744073709551615: Invalid argument And the vol-upload check. # virsh vol-upload --pool default qcow2-vol /var/lib/libvirt/images/raw-vol --offset 18446744073709551613 --length 18446744073709551615 error: cannot upload to volume qcow2-vol error: Unable to seek /var/lib/libvirt/images/qcow2-vol to 18446744073709551613: Invalid argument # virsh vol-upload --pool default qcow2-vol /var/lib/libvirt/images/raw-vol --offset 18446744073709551614 --length 18446744073709551615 error: cannot upload to volume qcow2-vol error: Unable to seek /var/lib/libvirt/images/qcow2-vol to 18446744073709551614: Invalid argument # virsh vol-upload --pool default qcow2-vol /var/lib/libvirt/images/raw-vol --offset 18446744073709551615 --length 18446744073709551615 error: cannot upload to volume qcow2-vol error: Unable to seek /var/lib/libvirt/images/qcow2-vol to 18446744073709551615: Invalid argument Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2202.html |