Avoid partially finished cache files.
Avoid partially finished cache files.

`VDI.copy` stores half-completed files directly in the SR where we may
inadvertenly make use of them. To avoid these 'half-baked' records, we
compare its current size to its expected size.

Fixes bug 1009750

Change-Id: I0f279ce69bfa0842a6bc74f19fd61462c6013b28

alexandrucoman/vbox-nova-driver,alvarolopez/nova,bgxavier/nova,citrix-openstack-build/nova,BeyondTheClouds/nova,BeyondTheClouds/nova,affo/nova,isyippee/nova,Stavitsky/nova,phenoxim/nova,zzicewind/nova,paulmathews/nova,maoy/zknova,orbitfp7/nova,mgagne/nova,NoBodyCam/TftpPxeBootBareMetal,mmnelemane/nova,devendermishrajio/nova_test_latest,mahak/nova,yatinkumbhare/openstack-nova,phenoxim/nova,apporc/nova,sridevikoushik31/nova,saleemjaveds/https-github.com-openstack-nova,iuliat/nova,maheshp/novatest,angdraug/nova,leilihh/novaha,Yusuke1987/openstack_template,klmitch/nova,CEG-FYP-OpenStack/scheduler,mikalstill/nova,barnsnake351/nova,maoy/zknova,DirectXMan12/nova-hacking,rahulunair/nova,eayunstack/nova,DirectXMan12/nova-hacking,NewpTone/stacklab-nova,varunarya10/nova_test_latest,SUSE-Cloud/nova,akash1808/nova,rrader/nova-docker-plugin,affo/nova,openstack/nova,dstroppa/openstack-smartos-nova-grizzly,paulmathews/nova,akash1808/nova,sebrandon1/nova,aristanetworks/arista-ovs-nova,cloudbase/nova-virtualbox,houshengbo/nova_vmware_compute_driver,yrobla/nova,Francis-Liu/animated-broccoli,yosshy/nova,dstroppa/openstack-smartos-nova-grizzly,Brocade-OpenSource/OpenStack-DNRM-Nova,Triv90/Nova,dims/nova,mandeepdhami/nova,Tehsmash/nova,maelnor/nova,scripnichenko/nova,maoy/zknova,tangfeixiong/nova,tianweizhang/nova,petrutlucian94/nova,adelina-t/nova,akash1808/nova_test_latest,rajalokan/nova,CiscoSystems/nova,eayunstack/nova,cyx1231st/nova,kimjaejoong/nova,dawnpower/nova,gspilio/nova,plumgrid/plumgrid-nova,redhat-openstack/nova,fajoy/nova,mgagne/nova,CloudServer/nova,aristanetworks/arista-ovs-nova,OpenAcademy-OpenStack/nova-scheduler,thomasem/nova,cloudbau/nova,jianghuaw/nova,zhimin711/nova,bigswitch/nova,fajoy/nova,silenceli/nova,nikesh-mahalka/nova,gooddata/openstack-nova,redhat-openstack/nova,sacharya/nova,vmturbo/nova,openstack/nova,yrobla/nova,bclau/nova,maelnor/nova,qwefi/nova,leilihh/novaha,ntt-sic/nova,hanlind/nova,scripnichenko/nova,sebrandon1/nova,cernops/nova,zaina/nova,Juniper/nova,leilihh/nova,LoHChina/nova,gspilio/nova,rajalokan/nova,jianghuaw/nova,rrader/nova-docker-plugin,TwinkleChawla/nova,thomasem/nova,savi-dev/nova,akash1808/nova_test_latest,alexandrucoman/vbox-nova-driver,devoid/nova,hanlind/nova,vladikr/nova_drafts,rajalokan/nova,mahak/nova,berrange/nova,takeshineshiro/nova,CloudServer/nova,shahar-stratoscale/nova,eonpatapon/nova,LoHChina/nova,usc-isi/nova,TieWei/nova,noironetworks/nova,kimjaejoong/nova,klmitch/nova,badock/nova,viggates/nova,tudorvio/nova,DirectXMan12/nova-hacking,silenceli/nova,belmiromoreira/nova,viggates/nova,savi-dev/nova,Triv90/Nova,ewindisch/nova,takeshineshiro/nova,leilihh/nova,shail2810/nova,jeffrey4l/nova,MountainWei/nova,ted-gould/nova,cloudbase/nova,j-carpentier/nova,felixma/nova,imsplitbit/nova,sridevikoushik31/openstack,mikalstill/nova,luogangyi/bcec-nova,JioCloud/nova_test_latest,sridevikoushik31/openstack,sridevikoushik31/openstack,ntt-sic/nova,yrobla/nova,tangfeixiong/nova,raildo/nova,maheshp/novatest,JioCloud/nova,whitepages/nova,klmitch/nova,cloudbase/nova,zzicewind/nova,nikesh-mahalka/nova,maheshp/novatest,rickerc/nova_audit,dawnpower/nova,mahak/nova,CiscoSystems/nova,gooddata/openstack-nova,devendermishrajio/nova_test_latest,tianweizhang/nova,j-carpentier/nova,qwefi/nova,CEG-FYP-OpenStack/scheduler,houshengbo/nova_vmware_compute_driver,rajalokan/nova,apporc/nova,NoBodyCam/TftpPxeBootBareMetal,tealover/nova,badock/nova,bgxavier/nova,NeCTAR-RC/nova,gooddata/openstack-nova,ted-gould/nova,watonyweng/nova,rahulunair/nova,Metaswitch/calico-nova,shootstar/novatest,tanglei528/nova,SUSE-Cloud/nova,tanglei528/nova,Juniper/nova,yatinkumbhare/openstack-nova,tealover/nova,usc-isi/nova,vmturbo/nova,varunarya10/nova_test_latest,openstack/nova,paulmathews/nova,double12gzh/nova,petrutlucian94/nova,cloudbase/nova,bigswitch/nova,mmnelemane/nova,joker946/nova,Metaswitch/calico-nova,shail2810/nova,Stavitsky/nova,cloudbase/nova-virtualbox,barnsnake351/nova,cernops/nova,raildo/nova,virtualopensystems/nova,gspilio/nova,dims/nova,yosshy/nova,savi-dev/nova,ruslanloman/nova,cloudbau/nova,shahar-stratoscale/nova,petrutlucian94/nova_dev,sridevikoushik31/nova,petrutlucian94/nova_dev,luogangyi/bcec-nova,orbitfp7/nova,spring-week-topos/nova-week,jianghuaw/nova,Francis-Liu/animated-broccoli,sridevikoushik31/nova,whitepages/nova,sridevikoushik31/nova,bclau/nova,plumgrid/plumgrid-nova,fnordahl/nova,sacharya/nova,shootstar/novatest,devendermishrajio/nova,CCI-MOC/nova,double12gzh/nova,felixma/nova,mikalstill/nova,berrange/nova,NoBodyCam/TftpPxeBootBareMetal,fnordahl/nova,projectcalico/calico-nova,blueboxgroup/nova,iuliat/nova,ewindisch/nova,hanlind/nova,vmturbo/nova,devoid/nova,JianyuWang/nova,isyippee/nova,imsplitbit/nova,rickerc/nova_audit,noironetworks/nova,aristanetworks/arista-ovs-nova,tudorvio/nova,angdraug/nova,Yusuke1987/openstack_template,houshengbo/nova_vmware_compute_driver,jianghuaw/nova,devendermishrajio/nova,OpenAcademy-OpenStack/nova-scheduler,Yuriy-Leonov/nova,eharney/nova,alvarolopez/nova,sebrandon1/nova,Juniper/nova,klmitch/nova,blueboxgroup/nova,vladikr/nova_drafts,dstroppa/openstack-smartos-nova-grizzly,BeyondTheClouds/nova,NewpTone/stacklab-nova,JioCloud/nova,TieWei/nova,alaski/nova,ruslanloman/nova,JioCloud/nova_test_latest,cernops/nova,edulramirez/nova,Yuriy-Leonov/nova,jeffrey4l/nova,JianyuWang/nova,cyx1231st/nova,mandeepdhami/nova,CCI-MOC/nova,eonpatapon/nova,spring-week-topos/nova-week,gooddata/openstack-nova,Triv90/Nova,joker946/nova,saleemjaveds/https-github.com-openstack-nova,vmturbo/nova,citrix-openstack-build/nova,usc-isi/nova,virtualopensystems/nova,TwinkleChawla/nova,rahulunair/nova,MountainWei/nova,alaski/nova,eharney/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,zhimin711/nova,projectcalico/calico-nova,edulramirez/nova,Juniper/nova,fajoy/nova,Tehsmash/nova,zaina/nova,belmiromoreira/nova,adelina-t/nova,NewpTone/stacklab-nova,NeCTAR-RC/nova,watonyweng/nova