block stream: close unused files and update ->backing_hd
commit5a67a1048e1294b35940e7432d57d8cd801e6571
authorMarcelo Tosatti <mtosatti@redhat.com>
Tue, 27 Mar 2012 00:22:10 +0000 (26 21:22 -0300)
committerKevin Wolf <kwolf@redhat.com>
Thu, 5 Apr 2012 13:11:37 +0000 (5 15:11 +0200)
tree15c28cf4bfa490b0101a98c3d2f387cbf1baac4e
parent28d3d1658a3692f9c34c3ecce14941faa1d2fe92
block stream: close unused files and update ->backing_hd

Close the now unused images that were part of the previous backing file
chain and adjust ->backing_hd, backing_filename and backing_format
properly.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=801449

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/stream.c