Bug 1035001
Summary: | VHDX: journal log should not be replayed by default, but rather via qemu-img check -r all | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Jeff Cody <jcody> | |
Component: | qemu-kvm | Assignee: | Jeff Cody <jcody> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 7.0 | CC: | acathrow, jcody, juzhang, michen, sluo, virt-maint | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | qemu-kvm-1.5.3-36.el7 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1063559 (view as bug list) | Environment: | ||
Last Closed: | 2014-06-13 11:56:54 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
Jeff Cody
2013-11-26 20:20:21 UTC
Posted upstream: http://lists.gnu.org/archive/html/qemu-devel/2013-12/msg03087.html The agreed above behavior is as follows: 1.) If the image is opened r/o, and has a dirty log, provide a helpful error message instructing the user to run qemu-img check -r all, to replay the image. 2.) If the image is opened r/w, and has a dirty log, replay the log automatically as we currently do. It should be noted that even without the patch above, running qemu-img check r- all on a VHDX image file will replay the log, even though an error is printed about VHDX not supporting 'check'. This is because prior to that error, the image file was already opened r/w by qemu-img. The patch posted upstream provides a .bdrv_check() implementation, and a useful error output. Fix included in qemu-kvm-1.5.3-36.el7 Reproduce and verified this issue with the instruction of comment #2 and comment #7. ######Reproduced: host info: # uname -r && rpm -q qemu-kvm 3.10.0-76.el7.x86_64 qemu-kvm-1.5.3-35.el7.x86_64 Steps and Results: 1. If the image is opened r/o. # qemu-img check -f vhdx tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx qemu-img: Could not open 'tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx': Could not open 'tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx': Permission denied 2. If the image is opened r/w. # qemu-img check -r all tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx qemu-img: This image format does not support checks # qemu-img check -f vhdx tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx qemu-img: This image format does not support checks ######Verified: host info: # uname -r && rpm -q qemu-kvm 3.10.0-76.el7.x86_64 qemu-kvm-1.5.3-45.el7.x86_64 Steps and Results: 1. If the image is opened r/o, and has a dirty log, provide a helpful error message instructing the user to run qemu-img check -r all, to replay the image. # qemu-img check -f vhdx tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx qemu-img: Could not open 'tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx': VHDX image file 'tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx' opened read-only, but contains a log that needs to be replayed. To replay the log, execute: qemu-img check -r all 'tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx': Operation not permitted 2. If the image is opened r/w, and has a dirty log, replay the log automatically as we currently do. # qemu-img check -r all tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx The following inconsistencies were found and repaired: 0 leaked clusters 1 corruptions Double checking the fixed image now... No errors were found on the image. # qemu-img check -f vhdx tests_qemu-iotests_sample_images_iotest-dirtylog-10G-4M.vhdx No errors were found on the image. Base on above, this issue has been fixed correctly, move to VERIFIED status, please correct me if any mistake, thanks in advance. Best Regards, sluo This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |