id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
3849	copy qcow2 file as virtual size instead of disk size	ldelana		"'''behavior:'''
copy a qcow2 file through mc causes copy of virtual size instead of disk size as expected if copying through cp command.

'''repro:'''
create an empty image of 20G
# qemu-img create -f qcow2 -o preallocation=metadata test.qcow2 20G

copy using cp ( test.qcow2 into test_cp.qcow2 )
# cp test.qcow2 test2.qcow2

copy using mc ( test.qcow2 into test_mc.qcow2 )

results:
# ls -la

qemu-img shows that test_mc.qcow2 allocates 20G on disk instead of 0G

# qemu-img info test.qcow2
image: test.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
'''disk size: 3.3M'''
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

# qemu-img info test_cp.qcow2
image: test2.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
'''disk size: 3.3M'''
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

# qemu-img info test_mc.qcow2
image: test3.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
'''disk size: 20G'''
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
"	defect	closed	minor		mc-core	master	duplicate	qcow2,copy				no branch	
