Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 806300

Summary: info block shows backing file still exists after stream the entire chain
Product: Red Hat Enterprise Linux 6 Reporter: Shaolong Hu <shu>
Component: qemu-kvmAssignee: Marcelo Tosatti <mtosatti>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, bsarathy, jcody, juzhang, kwolf, michen, mkenneth, tburke, virt-maint
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-26 13:01:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 806280    

Description Shaolong Hu 2012-03-23 11:58:27 UTC
Description of problem:
------------------------
after stream the entire chain, backing file still exists in info block output.


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
qemu-kvm-0.12.1.2-2.262.el6rhev.x86_64


How reproducible:
-----------------
100%


Steps to Reproduce:
--------------------
1.(qemu) info block
drive-virtio-disk0: removable=0 io-status=ok file=/root/RHEL-Server-6.3-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0

2.(qemu) snapshot_blkdev drive-virtio-disk0 /root/sn1 qcow2
Formatting '/root/sn1', fmt=qcow2 size=21474836480 backing_file='/root/RHEL-Server-6.3-64-virtio.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 
(qemu) info block
drive-virtio-disk0: removable=0 io-status=ok file=/root/sn1 backing_file=/root/RHEL-Server-6.3-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0

3.(qemu) block_stream drive-virtio-disk0 

4.(qemu) info block-jobs 
No active jobs
(qemu) info block
drive-virtio-disk0: removable=0 io-status=ok file=/root/sn1 backing_file=/root/RHEL-Server-6.3-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0

5. quit qemu-kvm.

6.[root@shu ~]# qemu-img info sn1
image: sn1
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 20G
cluster_size: 65536


Expected results:
------------------
After block stream finishes, set backing file as null.

Comment 2 Dor Laor 2012-03-25 10:26:29 UTC
IIUC it creates another qcow2 file on top of the existing one so that's the expected behavior. Marcelo can verify it

Comment 3 Kevin Wolf 2012-03-26 09:19:16 UTC
This is a valid bug report.

bdrv_change_backing_file() was not designed to work from the system emulator and change the BlockDriverState accordingly. It needs to be extended to update bs.

Comment 4 Marcelo Tosatti 2012-03-26 13:00:31 UTC
The fix for BZ #801449 adjusts bs->backing_file correctly. Marking it as a duplicate of that bug.

Comment 5 Marcelo Tosatti 2012-03-26 13:01:28 UTC

*** This bug has been marked as a duplicate of bug 801449 ***